in reply to Plugin Functionality?
You could start very easily with a concept of "run modes" in your program using CGI::Application.
non-Perl: Andy Ford