Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 romping around the Monastery: (8)
As of 2016-09-26 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (478 votes). Check out past polls.