- or download this
package Cat;
use Moo;
...
for (@{$litter->cats}) {
print $_->name . "\n"
}
- or download this
isa => sub {
my $param = shift;
...
unless ref $element eq 'Cat';
}
}
- or download this
die "<<$element>> must have a name attribute"
unless $element->can('name');
- or download this
isa => ArrayRef[ InstanceOf['Cat'] ]
- or download this
isa => ArrayRef[ HasMethods['name'] ]
- or download this
package Cat;
use Moo;
...
);
print $_->name . "\n" for @{ $litter->cats };