Re: MP2 easy cookie interface available

2005-08-23 Thread Philip M. Gollucci

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:

Hi folks,

I found the available cookie methods a bit tricky to use (I think the 
blessed scalars or overloading were confusing me!), so I wrote a simple 
cookie interface to use in place of Apache2::Cookie.  Most of the code 
is copied from that.


I haven't got time to CPAN-ify it at the mo, but there is some POD at 
the bottom and there are no licence conditions attached - I guess it 
should inherit the Apache2::Cookie license?


Its main feature is automatic use of MD5 hashes to protect the cookie 
from being modified by the user, so you can store things in it safely.


Grab it here:
http://www.versatilia.com/downloads/Validated.pm

and install it as Apache2/Cookie/Validated.pm somewhere in @INC.

cheers
John




--
END

What doesn't kill us can only make us stronger.
Nothing is impossible.

Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
  http://www.liquidityservicesinc.com
   http://www.liquidation.com
   http://www.uksurplus.com
   http://www.govliquidation.com
   http://www.gowholesale.com



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