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

Re^5: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs? (ugly++)

by hdb (Prior)
on Sep 27, 2013 at 10:29 UTC ( #1055956=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs? (ugly++)
in thread Why doesn't Perl provide %_ as the hash equivalent of @_ in subs?

Like with $&, $`, $' you would only have a performance hit if you actually used it.


Comment on Re^5: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs? (ugly++)
Download Code
Re^6: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs? (ugly++)
by tobyink (Abbot) on Sep 28, 2013 at 07:13 UTC

    In recent versions of Perl there's virtually no performance hit using these variables any more.

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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2014-12-29 14:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (190 votes), past polls