Thanks for the ideas.  Yes Darren's idea will work too
it seems.  I was hacking around last night and came up
with this solution, which is fairly efficient...

NavBar.pm does a reg exp on a comment tag you specify,
so I added to this to include my include tag, then
just added the random.cgi code to NavBar.pm...

while (<$fh>)
{
      s/(<\!--start-->)/$navbar$1/oi;
      s/(<\!--\#exec
cgi=\"\/salescgi-bin\/random.cgi\"-->)/$random$1/oi;
}
continue
{
   $r->print($_);
}
return OK;


Thanks for your help gentlemen.  

Charles.


--- darren chamberlain <[EMAIL PROTECTED]> wrote:
> Hi Charles,
> 
> I was having a similar problem using a variation of
> the Apache::NavBar module.
> My solution was very straightforward: I modified
> NavBar.pm to merely print
> the bar (without returning anything) and then called
> it from a server-parsed
> page using a perl include.
> 
> As such:
> 
> sub handler {
>     my $r = shift;
>     my $bar = read_configuration($r) || return '';
>     my $navbar = make_bar($r, $bar);
>     $r->print($navbar);
> }
> 
> the rest of the module is unchanged.
> 
> It gets called this way:
> 
> <!--#perl sub="My:NavBar" -->
> 
> from the various files that need it.
> 
> Since the module doesn't need to do any regex
> replacements or anything like
> that, it's a little faster. Since none of the rest
> of the module changes,
> you still get the advantages of the caching and
> everything.
> 
> If that doesn't work for you, try using
> $r->push_handlers to make the page
> server-parsed after you modify the content (don't
> know if this will work,\
> though).
> 
> darren 
> 
> Charles ([EMAIL PROTECTED]) wrote:
> > I wrote (rewrote from the book) the NavBar.pm and 
> > it works great, except for the fact that it 
> > killed all SSI's for this directory..
> 
>   [ snip ]
> -- 
> Help stamp out and eradicate superfluous redundancy.
> 


=====

******************************

http://www.s1te.com
The home for web professionals

******************************
__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one place.
Yahoo! Shopping: http://shopping.yahoo.com

Reply via email to