Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^7: Moose Attribute Default Dependency

by elTriberium (Friar)
on Nov 16, 2013 at 23:26 UTC ( [id://1062947]=note: print w/replies, xml ) Need Help??


in reply to Re^6: Moose Attribute Default Dependency
in thread Moose Attribute Default Dependency

You don't have to use builder, this also works:

has 'x' => ( is => 'rw', isa => 'Str', default => sub { my ($self) = @_; return $self->value; }, lazy => 1, );

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found