Say I have 3 main pieces of code for a shopping cart - user management, product management, and order management. In this case, I'd have one CGI::Application module that works on the run mode "action" variable. So we'd have three run-modes: user, product, and order.
My "Main" CGI::Application would be using the "action" variable to decide the run-mode. It's only choices would be user, product, and order. Depending on which of these it is, it would instantiate another CGI::Application module of that type. So if the main run-mode is "user," it would do something like:
my $user_app = new UserApp(...);
You might want to take a look at
CGI::Application::Dispatch. It does the same sort of thing in that it uses the URL to figure out the application & runmode. So the url "/app/product/delete?product_id=1234" would map to the YourPrefix::Product CGI::Application class (the prefix is configurable) and set the runmode for said application to "delete". It seems like the same as idea as your code above, but with less code you have to write. :-)