http://qs1969.pair.com?node_id=612565


in reply to CGI::Application with 'main' runmodes and 'sub' runmodes

CGI::Application::Dispatch was created to help you with problems like this so e.g. instead of your App::Main you'd have an invocation script like:
#!/usr/bin/perl use strict; use CGI::Application::Dispatch; CGI::Application::Dispatch->dispatch( prefix => 'App', default => 'one', );
This should do what you want (including the path info dispatch), but CGI::Application::Dispatch has lots more configuration options should you need more power.

Having said this, I now prefer CGI::Prototype over CGI::App, beacuse with CGI::Prototype, run modes are handled by classes so each of your two dozen (and growing) run modes would live in its own small module. I find this makes the application a lot more manageable as it increases in size.