use warnings; use strict; use CGI::Application::Server; use lib 'lib'; use Shop; use CGI::Application::Dispatch; CGI::Application::Dispatch->dispatch(); sub dispatch_args { return { prefix => '', table => [ '' => { app => 'Shop', rm => 'products' }, ':app/:rm' => { }, 'admin/:app/:rm' => { prefix => 'MyApp::Admin' }, ], }; } my $app = Shop->new(PARAMS => { }); my $server = CGI::Application::Server->new(); #$server->document_root('./t/www'); $server->entry_points({ '/index.cgi' => $app, }); $server->run;