Hi Puneet
On Wed, 2009-08-12 at 12:07 -0500, P Kishor wrote:
> > 1. sub setup {
> > my $self = shift;
> > $self->SUPER::setup();
> > $self->run_modes([qw( welcome view )]);
> > $self->start_mode('welcome');
> > $self->param(protected_runmodes => [qw(view)]);
>
>
> The above line re-declares the protected_runmodes param, so all the
> protected_runmodes set in MyAuthen vanish and we left with only 'view'
> as a protected_runmode. The following code corrects the situation
>
> my $protected_runmodes = $self->param('protected_runmodes');
> push @$protected_runmodes, 'view';
All that does is store the run modes in an array local to the sub.
It does /not/ pass the updated list back to whatever object manages
these things.
--
Ron Savage
[email protected]
http://savage.net.au/index.html
##### 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/ ##
## ##
################################################################