[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Omaha.pm] perl -Moose=foo



$ perl -Moose=foo -lE 'has attr => (is => "rw", isa => "Str", trigger => sub { say "trigger" }); after attr => sub { say "hi" }; my $f = foo->new(attr => "hello"); say "built"; $f->attr'
trigger
built
hi

Huh. Moose triggers are interesting.

http://search.cpan.org/~flora/Moose-0.99/lib/Moose/Manual/Attributes.pod#Triggers

j