Help for this page

Select Code to Download


  1. or download this
    use Person;
    my $p = Person->new(age => 10);
    print "Person has age ", $p->age();
    
  2. or download this
    package Person;
    
    ...
                  isa => 'AdmissibleAge');
    
    1;
    
  3. or download this
    package Types;
    
    ...
      => where {$_ >= 0 and $_ <= 99};
      
    1;