Help for this page

Select Code to Download


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