Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs?

by tobyink (Abbot)
on Sep 26, 2013 at 21:36 UTC ( #1055906=note: print w/ replies, xml ) Need Help??


in reply to Why doesn't Perl provide %_ as the hash equivalent of @_ in subs?

I've been working on a Method::Signatures-like module recently, and it does use %_ for this purpose, but only if the sub is known to take at least one named parameter.

If you're interested in beta testing, I can let you know if/when I have something vaguely usable.

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name


Comment on Re: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2014-09-16 08:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (158 votes), past polls