perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yp...@club-internet.fr
Subject Re: Re: Modperl2 question
Date Thu, 09 Mar 2006 10:32:20 GMT
Thanks for the advices Fred.

>> Hi All!
>> 
>> I'm planing to port a web application for mod_perl1 ro mod_perl2.
>> 
>> I've carefully read to porting pages related to that
>> (http://perl.apache.org/docs/2.0/user/porting/), but unfortunatelly, I haven't
>> found solutions to my simple problems.
>>  
>> 1. How can I read a cookie from a PerlResponseHandler ?
>
>a) You can use $r->headers_in
>http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html#C_headers_in_
>
>b) You can use the libapreq glue
>http://svn.apache.org/viewcvs.cgi/httpd/apreq/trunk/glue/perl/lib/Apache2/Cookie.pm?view=markup
>
>c) You can use CGI::Cookie
>http://search.cpan.org/perldoc?CGI::Cookie#Recovering_Previous_Cookies
>
>> 2. How can I read form params from a PerlResponseHandler too?
>
>a) You can read the data directly using $r->read
>http://perl.apache.org/docs/2.0/api/Apache2/RequestIO.html#C_read_
>
>b) You can use the libapreq glue
>http://svn.apache.org/viewcvs.cgi/httpd/apreq/trunk/glue/perl/lib/Apache2/Request.pm?view=markup
>
>c) You can use CGI
>http://search.cpan.org/perldoc?CGI#FETCHING_THE_VALUE_OR_VALUES_OF_A_SINGLE_NAMED_PARAMETER%3A
>
>> 3. Is there any good method to cleanly share data between two or more 
>> PerlResponseHandler(s) (like $f->ctx() in filter) ?
>
>You can use $r->pnotes
>http://perl.apache.org/docs/2.0/api/Apache2/RequestUtil.html#C_pnotes_
>
>> The uniq solution I found is to use the Apache::Compat wich by the way works 
>> very fine.
>> But now, I want to fully move to mod_perl2.
>> Is there some examples dealing with my problems?
>
>I prefer using the libapreq libraries (http://httpd.apache.org/apreq) 
>for most operations with regards to 1) and 2), but there are many ways 
>to do it.  Check the links above for some good examples in the docs.
>
>


Mime
View raw message