Help for this page

Select Code to Download


  1. or download this
    package Person;
    
    ...
    sub jobs { @{$_[0]{jobs}} };
    sub job { $_[0]{jobs}[$#{$_[0]{jobs}}] } # the last job is assumed cur
    +rent
    
  2. or download this
    package Person;
    
    # ... other methods and such
    
    sub cool { not $_[0]{job} =~ /programmer/ };
    
  3. or download this
    sub cool { not $_[0]->job() =~ /programmer/ };
    
  4. or download this
    nothingmuch% perl
    
    ...
                Rate method direct
    method  252717/s     --   -75%
    direct 1030928/s   308%     --