in reply to Code Initialization

For CGI I would use CGI::Application. It allows you to use one file to hold all your "run modes" and then to break it down from there.