laziness, impatience, and hubris | |
PerlMonks |
Re^3: Creating 'new' subroutine.by tobyink (Canon) |
on Oct 11, 2013 at 12:04 UTC ( [id://1057875]=note: print w/replies, xml ) | Need Help?? |
If we're guessing at intentions, then I might wager:
Though that's probably better written as:
... to deliberately shallow clone in the case of a hashref.
use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
In Section
Seekers of Perl Wisdom
|
|