![]() |
|
Keep It Simple, Stupid | |
PerlMonks |
Re: make subroutine that takes expression as implicit block as first argby LanX (Saint) |
on Aug 13, 2010 at 19:56 UTC ( #854997=note: print w/replies, xml ) | Need Help?? |
> The block part is easy; but is it possible to make it do the expression part? no, unfortunately there's no prototype mechanism for the latter. You can neither easily allow calling a function (which is a special case of the expression part). There was a discussion about this a year ago, I will update a link. UPDATE: see coderefs and (&) prototypes and The & prototype and code references in scalars..
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|