Mo::builder - Adds the builder feature to Mo's has
use Mo qw'builder'; has name => ( builder => 'name_lookup' ); sub name_lookup { my ($self) = @_; ... }
Adds the builder parameter to has, which expects a method name, which is executed on $self to set the attribute if it hasn't been set yet.
builder
$self
Currently this is always called lazily.
To install Mo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mo
CPAN shell
perl -MCPAN -e shell install Mo
For more information on module installation, please visit the detailed CPAN module installation guide.