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