Mailing List Archive

[mp2] obtaining connection object within a filter
Hi folks,

Just thought I would mention this online documentation discrepancy, which I don't
believe has been addressed on the list yet.

This page:
http://perl.apache.org/docs/2.0/user/handlers/general.html
states that in order to obtain the connection object from within a filter, you must do this:

my $c = $filter->connection;

However, as I just discovered, Apache::Filter does not have the 'connection' method.
The correct method is stated on this page:
http://perl.apache.org/docs/2.0/user/handlers/filters.html

my $c = $filter->c;

Hope this helps! :-)

-m

--
## Matt J. Avitable (mja@escapement.net)
## General Partner / Programmer
## Escapement Arts And Media

## http://www.escapement.net/
## Phone: (804) 400-0605


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [mp2] obtaining connection object within a filter [ In reply to ]
Matt J. Avitable wrote:
> Hi folks,
>
> Just thought I would mention this online documentation discrepancy, which I don't
> believe has been addressed on the list yet.
>
> This page:
> http://perl.apache.org/docs/2.0/user/handlers/general.html
> states that in order to obtain the connection object from within a filter, you must do this:
>
> my $c = $filter->connection;
>
> However, as I just discovered, Apache::Filter does not have the 'connection' method.
> The correct method is stated on this page:
> http://perl.apache.org/docs/2.0/user/handlers/filters.html
>
> my $c = $filter->c;
>
> Hope this helps! :-)

Of course it does ;) I've committed the fix. Thank you!

p.s. me thinking to have an alias, so $filter->connection will work as well
(in parallel with $r->connection). What do you think?

__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org