James,

Another thought. If these routines are meant to be reused among
various C::A applications, have you considered making (one or more)
superclass that you're application is a base of? Like the following?
This way you could have myapp1, myapp2, etc. that inherit from
"superclassMyApp". Which inherits from "superclassWebApp." With a
hierarchy like this you could keep extremely common things in the
highest level. Things that are application specific in lower levels.
You're dbh, uuid and logging routines might go in the top-most level.

===========
package myapp;

use base 'superclassMyApp';

[Methods specific to your application, like setup and actual run modes].

etc...

1;
===========

package superclassMyApp;

use base 'superclassWebApp';

[common methods. Maybe cgiapp_init goes here.]

1;
===========

package superclassWebApp;

use base 'CGI::Application';

[even more common methods. Maybe cgiapp_get_query goes here if you're
using CGI::Simple.]

1;
============

#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################

Reply via email to