Thank you all for your help, 

These all sound like completely civilized solutions.  Wish I had done it upfront! At 
least I'm using the right framework to do it with.

Man, this stuff rocks!

-Dan Collis Puro




Jesse Erlbaum <[EMAIL PROTECTED]> wrote:
> > Can you make those methods into their own, independant 
> modules, that both
> yoru SuperClass and your cron scripts make use of?
> 
> So:
> package SuperClass;
> use base CGI::Application;
> 
> use Package::Functions;
> 
> sub do_xyzzy{
>   my $self = shift;
>   Package::Functions->xyzzy($self->param('Data'));
> }


That's exactly how I handle it.  Consider:

  MySite::Utility
    - A module containing "model" functions needed by cron scripts and
CGI-Apps.

  MySite::CronMaintainence
    - A module which uses MySite::Utility to perform various functions.
MyApp::CronMaintainence is used by cron scripts to do various things.

  MySite::WebApp
    - SubClass of CGI-App.  Uses MySite::Utility to perform some functions.


This is a good example of a Model-View-Controller architecture (assuming
you're using templating as your "View").


-Jesse-

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to