[ic] Session Referer not as Expected

Orko interchange-users@interchange.redhat.com
Sat Apr 13 00:42:01 2002


> On Sat, 2002-03-30 at 12:35, Kevin Walsh wrote:
> > > 
> > > Is there somewhere central that I could tell IC to reset the referer if
> > > it has changed, is valid and is not a cart referer?
> > > 
> > You could try something like this in your catalog.cfg file:
> > 
> >     Autoload <<EOA
> >         [perl]
> >             my $r = $Tag->env('HTTP_REFERER');
> >             if ($r && $r !~ /^($Config->{VendURL}|$Config->{SecureURL})/){
> >                 $Session->{referer} = $r;
> >             }
> >         [/perl]
> >     EOA

Thanks again for the code Kevin.  

I just got to implementing this, and have a question, if anyone could
answer it.  The docs describe the AutoLoad as:

<snip>

3.7. Autoload

Sets an action that is automatically performed for every access. It is
performed before any page parsing occurs, and before the action or page
is even determined. Can contain ITL tags or a global
subroutine name. If the return value is true, a normal display of
$CGI->{mv_nextpage} will occur -- if it returns a false (zero, undef, or
blank) value, no page will be processed.

As an example, to remap any mv_nextpage accesses to the private
subdirectory of pages, set:

Autoload   [perl] $CGI->{mv_nextpage} =~ s:^private/:public/:; [/perl]

</snip>

With the perl that Kevin gave me at the top of this post, what would
happen differently if I returned a true value from the AutoLoad?  I'm
having trouble understanding the phrasing:

"If the return value is true, a normal display of $CGI->{mv_nextpage}
will occur -- if it returns a false (zero, undef, or blank) value, no
page will be processed"

What does "no page will be processed" actually mean?

Thanks in advance,

-- orko

<snipped out Kevin's sig> ;-)