Help for this page

Select Code to Download


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