libapreq2 on CPAN

2009-04-17 Thread John ORourke

Hi folks,

Is there a problem with libapreq2 on CPAN?

cpan make libapreq2
Warning: Cannot install libapreq2, don't know what it is.

cpan make Apache2::Request
Warning: Cannot make Apache2::Request, don't know what it is.


thanks in advance,
John



APR::Request::Param charset and UTF-8 flag

2007-06-08 Thread John ORourke

Hi folks,

I'm not sure if this is a bug and I'm new to the list so please forgive 
any bad form.


I'm trying to use APR::Request::Param-charset(8) but it doesn't seem to 
be setting perl's UTF-8 flag as the documentation says it should.


Here's the code:

sub handler { my $r=shift;
   $query = Apache2::Request-new($r);
   $param_table = $query-param();
   $param_table-param_class( 'APR::Request::Param' );
   $_-charset(8) foreach values %$param_table;

   my $val = $param_table-{my_param};   # gives me a 
APR::Request::Param, OK so far

   print $val-charset();   # gives me '8', OK so far...
   print utf8::is_utf8( $val-value() ); # false!
   print utf8::is_utf8( $val ); # also false!
}

If this is correct behaviour then I can't see any purpose for the 
charset method - can someone enlighten me?


cheers
John



Re: MP2 easy cookie interface available

2005-08-23 Thread John ORourke

Thanks for the feedback Philip.

I believe it does subclass APR::Request::Cookie but I just left in all 
the 'use' statements from Apache2::Cookie.  I figured the APR:: 
namespace would be the wrong place for it too.


It need to override so many methods because they need to get the 
RequestRec object so the get_secret method can read the secret from 
dir_config - I couldn't think of an easier way but it does seem a bit much.


cheers
John


Philip M. Gollucci wrote:


Fowarding to apreq-dev (at) apache.org

Did you really need to override all those methods?  Granted I haven't 
looked at it that closely.


The bigest thing I would say is you should subclass perhaps 
APR::Request::Cookie instead as

that is the API we recommend these days.


John ORourke wrote:


http://www.versatilia.com/downloads/Validated.pm






Re: Apache2::Cookie odd return values

2005-08-02 Thread John ORourke
Right, I've solved my problem with a hack and some RTFSing, but I think 
I've found a bug either in the docs or Apache2::Cookie...


Basically if I read cookies like this:
$cookie_hash_ref = APR::Request::Apache2-handle($r)-jar();
it works, I can treat the return as a hash of cookies.

However, if I (following the Apache2::Cookie man page) go:
$jar=Apache2::Cookie-new($r);
foreach $name ($jar-cookies()){ blah blah }
then the names are actually the full baked header value (eg. name=value)

I have to crack on with my project but I'll leave that one with you.  
Phil, thanks for the pointers and the cookie recipes in the FAQ!


John