Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Passing an anonymous block to a method.

by Corion (Patriarch)
on Mar 10, 2011 at 15:40 UTC ( [id://892446]=note: print w/replies, xml ) Need Help??


in reply to Re: Passing an anonymous block to a method.
in thread Passing an anonymous block to a method.

Unfortunately not, for two reasons:

  • Prototypes are disregarded when a code block is invoked as a method (see perlsub).
  • & as a prototype only works if it is in the first position. $& does not allow to leave the sub from the second parameter.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://892446]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-04-26 06:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found