Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Localizing hash keys in an AoH

by tobyink (Abbot)
on Mar 15, 2013 at 22:58 UTC ( #1023791=note: print w/replies, xml ) Need Help??


in reply to Re^2: Localizing hash keys in an AoH
in thread Localizing hash keys in an AoH

It could be made more readable. Defining entire packages within a sub is a trick I'm fond of, but I'm aware it's not everybody's cup of tea.

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1023791]
help
Chatterbox?
[marto]: puntastic
[choroba]: o'nest
[Eily]: yes we're pretty prawn to making puns around here

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2017-06-29 12:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (662 votes). Check out past polls.