Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Moose stringification overloading isn't working

by tobyink (Abbot)
on Feb 10, 2013 at 08:54 UTC ( #1018036=note: print w/replies, xml ) Need Help??


in reply to Moose stringification overloading isn't working

You're not using something like namespace::autoclean are you? It breaks overloading. Try namespace::sweep instead.

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
  • Comment on Re: Moose stringification overloading isn't working

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018036]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2016-12-08 14:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (142 votes). Check out past polls.