Ingy döt Net > Mo-0.34 > Mo::builder

Download:
Mo-0.34.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.34   Source   Latest Release: Mo-0.39

Name ^

Mo::builder - Adds the builder feature to Mo's has

Synopsis ^

    use Mo qw'builder';
    has name => ( builder => 'name_lookup' );

    sub name_lookup {
        my ($self) = @_;
        ...
    }

Description ^

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.

Currently this is always called lazily.

syntax highlighting: