package Stucki::Command::Ro ; sub run { print "Ro ro ro-sham-bo, gently down the stream\n" } 1; #### package Stucki; use Module::Load qw/ load /; sub run { my( $shelf, $command, @rest ) = @_; my $plugin = "Stucki::Command::".$command; load $plugin; ## or dies $plugin->run( @rest ); } 1; #### #!/usr/bin/perl -- use Stucki::Frontend::CLI; Stucki::Frontend::CLI->run; #### #!/usr/bin/perl -- use Stucki::Frontend::CGI; Stucki::Frontend::CGI->run;