Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 exploiting the Monastery: (6)
As of 2015-07-03 06:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (48 votes), past polls