moose

More attribute options

The predicate option tests if the slot has a value

has 'bar' => (..., predicate => 'has_bar', ...);

my $foo = Foo->new;
$foo->has_bar; # No

my $foo = Foo->new(bar => $bar);
$foo->has_bar; # Yes  
s | << | >> | i