> Mark Stosberg wrote:
>
> > I have something like this in my Super class to catch bad RM calls:
> >
> >    $self->run_modes(
> >         AUTOLOAD             => sub {
> >                 return $self->error(title=>'Page not found' )
> >             }
> >    );
>
> Wow, am I glad I joined this mailing list... that is a very useful
> piece of knowledge right there. Not magic, not rocket science, but it
> may have taken me six months or more before I hit up doing it that
> way. Thanks Mark!
>
>
> ---------------------------------------------------------------------

Thanks Mark,

That is just what I need.

I acutally have a number of run modes in each of my modules.

AUTOLOAD
not logged in
not authorised
etc.

It will make life a lot easier to pull them out and place them in a super
class. At least that is the proper place for them I guess.

Would the following surface, or do I have to place a self reference in front
of the sub routines.

$self->run_modes(
     'not_logged_in' => 'not_logged_in_message',
     'unauth' => 'unauth_access',
     'AUTOLOAD' => 'no_run_mode'
);

I have also got to the bottom of the problem with the header redirect.

If a URL is entered directly into the address bar and the header redirect is
done at that point then the updated URL is placed into the address bar. If
the redirect is done a page refresh then although the page is redirected the
actual URL is not updated, in IE anyway. It don't know if this is the case
in other browsers.

This does not seem to be a major problem anymore as it was only with my
testing that I was changing the SSL settings and just hitting refresh which
was causing the problem. In a live environment this would not be the case as
once the setting is done it would not be changed or at least not until a
site update which would be rare.

Adam


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 20/08/2003


---------------------------------------------------------------------
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