On Wed, 13 Sep 2000, Geoffrey Young wrote:

> > My other question is about Apache::Request.   Why does this:
> > 
> >              my $apr = Apache::Request->new($r);
> >              my @params = $apr->param;
> > 
> > poon the parameters listing when it runs?   If I have a page 
> > that contains 
> > three scripts as components, I need every component to get 
> > any arguments 
> > passed in.   If I run the above for each component, only the 
> > first one gets 
> > the arguments.   All others after that get junk.   I have 
> > corrected for 
> > this by calling the code only once, but I'm curious as to 
> > whether or not 
> > this is the expected behavior and why.
> 
> yes, the behavior is expected :)
> 
> try Apache::RequestNotes - it uses Apache::Request during init so everyone
> can get to the data as many times as they want.

Or alternatively changing this:

sub handler {
        my $r = shift;
        ...

to this:

sub handler {
        my $r = Apache::Request->new(shift);
        ...

Will make your life infinitely easier (Apache::Request is a subclass of
Apache).

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org

Reply via email to