Rhesa Rozendaal <mailto:[EMAIL PROTECTED]> wrote:
: 
: I don't think you need to be that fancy. The standard run_modes()
: function *adds* the supplied arguments to its internal storage. So
: you can add the 'login' run_mode in your super class, and simply add
: the custom run modes in your class:  
: 
: 
:    package CA::Base;
:    use base qw/CGI::Application/;
: 
:    sub cgiapp_init {
:      my $self = shift;
:      $self->run_modes([ 'login' ]);
:    }
:    1;
: 
:    package CA::MyApp;
:    use base qw/CA::Base/;
: 
:    sub setup {
:      my $self = shift;
:      $self->run_modes([ qw/foo bar/ ]);
:    }
:    1;
: 
: Now every package that inherits from CA::Base has a login run mode.
: No hassle. 

    Thank you. That was exactly what I was looking for.


Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              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