Help for this page

Select Code to Download


  1. or download this
    use CGI qw(:all);
    my $op = param('operation');
    
    my $table = create_dptable TestPkg;
    $table->{$op}->() if exists $table->{$op};
    
  2. or download this
    use CGI qw(:all);
    my $op = param('operation');
    ...
        TestPkg->$dispatch('Hello!')
            if defined *{"TestPkg::$dispatch"}{CODE};
    }
    
  3. or download this
    my $input = <>;
    
    my $table = create_dptable TestPkg;
    $table->{$_}->($input) foreach (keys $table);
    
  4. or download this
    my $input = <>;
    
    ...
                     keys %{*{'TestPkg::'}}
            ); 
    }