Help for this page

Select Code to Download


  1. or download this
    if ($act eq 'open_file'){ 
        #stuff;
    }
    ...
    elsif ( $act eq 'speak' ) { 
        # stuff;
    }
    
  2. or download this
    package My::Actions;
    use Carp;
    ...
      my $class = shift;
      croak "Class ($class) did not implement do_stuff()";
    }
    
  3. or download this
    use My::Actions;
    my $object = My::Actions->factory($act);
    $object->do_stuff;