Re: Unfamiliar syntax

2018-07-23 Thread James Kerwin
Morning All, Thank you for the help, it's really useful and gives me plenty to look at. When you know what something is called (e.g. anonymous subroutines) it becomes much easier to look it up. Thanks, James On Fri, Jul 20, 2018 at 5:47 PM, Octavian Rasnita wrote: > *From:* James Kerwin > >

Re: Unfamiliar syntax

2018-07-20 Thread Octavian Rasnita
From: James Kerwin Afternoon all, I have been asked to take a look at a .pl file which is part of a set-up called "EPrints". The particular file controls who can access documents on a server. Excluding some comments, the file starts like: $c->{can_request_view_document} = sub {

Re: Unfamiliar syntax

2018-07-20 Thread Илья Рассадин
I Found it on github https://github.com/eprints/eprints/blob/392474eec1b8125a66ed2d3e12b02aeb67dc07c4/lib/defaultcfg/cfg.d/security.pl On 7/20/18 6:24 PM, Chas. Owens wrote: All of this is supposition since I can't see anything you haven't shown us. It sounds like this code is part of a larg

Re: Unfamiliar syntax

2018-07-20 Thread Илья Рассадин
Hi! $c is hash reference with key "can_request_view_document"; The value for that key is anonymous sub. You can call this sub like this $c->{can_request_view_document}->($doc, $r); On 7/20/18 6:04 PM, James Kerwin wrote: Afternoon all, I have been asked to take a look at a .pl file which

Re: Unfamiliar syntax

2018-07-20 Thread Chas. Owens
All of this is supposition since I can't see anything you haven't shown us. It sounds like this code is part of a larger program that is going to call do "EPrints"; which will bring the source of EPrints into the larger program. The $c variable is probably setup there. What the code in EPrin

Re: Unfamiliar syntax

2018-07-20 Thread Gil Magno
2018-07-20 16:04:11 +0100 James Kerwin: > Afternoon all, > > I have been asked to take a look at a .pl file which is part of a set-up > called "EPrints". The particular file controls who can access documents on > a server. > > Excluding some comments, the file starts like: > > $c->{can_request_v