Lazy is very powerful
- From my CPAN indexer (very abridged)
- http://git.jrock.us/?p=MetaCPAN.git;a=blob;f=lib/MetaCPAN/Distribution.pm;hb=HEAD
package Distribution; has 'filename'; has 'destination'; # lazily extracts filename to a temp dir, and returns that has 'md5'; # lazily calculates the md5sum has 'manifest'; # looks in $self->destination for MANIFEST and returns parsed copy
Predicates
- has a value been set?
has 'foo' => (
is => 'ro',
required => 0,
predicate => 'has_foo',
);
Class->new->has_foo; # false
Class->new( foo => 42 )->has_foo; # true