Help for this page

Select Code to Download


  1. or download this
    my $effect = Effect->new;
    $effect->set( salary => 1.02, '*' ); # A 2% raise
    $employee->apply_effect( $effect );
    
  2. or download this
    sub AUTOLOAD {
    # do nothing
    }
    
  3. or download this
    $employee->salary(  $employee->salary * 1.02  );
    
  4. or download this
    $employee->salary(  $employee->salary * 1.02  );
    # we don't mind if they don't have a frobnitz
    eval { $employee->frobnitz(  $employee->frobnitz + 1.5  ) };