[ic] Bypassing the whole [more] system

Schuyler W Langdon interchange-users@icdevgroup.org
Mon Sep 30 23:12:01 2002


Mike Heins wrote:
<snip>
> I have been thinking about configurable missing-URL routines. Right now,
> the default is that if a page is not found, a flypage is tried. If that
> is not found, then in 4.9 the DirectoryIndex is tried (allowing index.html
> to be the index page for a directory). Then it is passed to the special
> page "missing", whatever that is defined to be.
>
> I thought of adding a "PageResolution" directive, i.e.:
>
>     PageResolution   category_page Vend::Interpolate::fly_page
>
> That would allow the Sub/GlobalSub "category_page" to get first crack
> at a missing URL, followed by a try at the flypage.
>

I really like this idea, it will add a great deal of customization
potential. Is it something that will be implemented? In the mean time, I set
this up by modifying Page.pm a little so it checks PageResolution (which I
have defaulted to Vend::Interpolate::fly_page) and looping through the args
passed (@foobar) something like this:
my $save=undef;
foreach(@foobar){
$cr = \&$_;
$save = delete $SIG{__DIE__} if defined $SIG{__DIE__};
$page = eval {$cr->($name)};
$SIG{__DIE__} = $save if defined $save;
last if(defined $page);}

It seems to work allright, but I don't know where to declare a global sub
for something like "category_page"? I tried adding it to the cfg file and it
gives a compile error "unknown directive GlobalSub".

Schuyler Langdon
GatorDev