[EMAIL PROTECTED] wrote:
I'm liking this thread. But I have some elementary questions:


package My::MainApp;

use base qw/My::BaseApp/; # I already have this one; it handles sessions
etc
use My::MainApp::Admin; # contains the run modes dealing with admin
functions
use My::MainApp::News;  # another example package of run modes

# rest of app follows
# this app still has some runmodes of its own, but most have been moved
# into the packages use()d above.

1;


1) The above is *not* your base program, right? So what is it doing? I
understand base has all the cgiapp_xxxx stuff and your setup. And I
understand that ::Admin and ::News are doing specific functions, but this
inbetween module is unclear.

This "in-between" module is my actual application: the one that the instance script uses. The My::BaseApp would be a direct subclass of CGI::Application. I usually have one around to take care of generic stuff (like handling sessions and other plugins), but it doesn't have run modes of its own.
Sorry if that was confusing.

2) Also, in your sub import {} are you only importing the run modes for
that module (I assume)? My real question is, then, do ALL the runmodes
still get listed in the base module?

The base module does no longer list run modes itself. All the run modes are moved into the sub packages. The import() call registers them in the base module though.

3) How are these files named when they are saved to the server? Just
"Admin.pm"?


They would be named as usual: My/MainApp/Admin.pm
They follow the standard package to filename mapping.

Does that clear it up?

Rhesa

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/cgiapp@lists.erlbaum.net/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to