Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 perusing the Monastery: (11)
As of 2014-07-14 14:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (262 votes), past polls