- or download this
use strict;
use warnings;
...
for (@{$litter->cats}) {
print $_->name . "\n"
}
- or download this
my $litter = Litter->new(cats => [$cat1, 1]);
- or download this
Can't call method "name" without a package or object reference at ...
- or download this
package Litter;
use Class::Struct;
struct (cats => '@Cat');
1;