Andrew Wyllie <[EMAIL PROTECTED]> writes: > my $jar = Apache2::Cookie::Jar->new( $r, VALUE_CLASS => > "Alta::Cookies::Cookie" );
Oops, looks like I b0rked that API in 2.05. Here's the preferred aproach now: my $req = APR::Request::Apache2->handle($r); my $jar = $req->jar; $jar->cookie_class("Alta::Cookies::Cookie"); # use $jar as if it were $jar->cookies from 2.04-dev. > I have tried looking through the tests for libapreq, but I could not > find a reference to Apache2::Cookie::Jar. That package should've died anyways, since we killed off the apreq_jar_t struct in 2.05-dev. In any case, IMO you're better off learning the APR::Request APIs as they are emerging now. The core is here: # like Apache2::Request->new my $req = APR::Request::Apache2->handle($r, ...); my $args = $req->args; # the args table my $body = $req->body; # the body table my $param = $req->param; # the param (body + args) table my $upload = $req->upload; # upload table requires APR::Request::Param # each of the tables above are read-only (fast!) tiehash refs, # and the values are simple scalars. But you can upgrade them # to full params by changing the param_class, ie: $body->param_class("APR::Request::Param"); # that way you can call methods on each value, $v->is_tainted($on_off), # $v->charset($number), etc. Also, by turning off the is_tainted flag, # that also means you are trusting apreq with the charset # interpretation. That means you can do a single taint-checking # sweep across the params in some early section of your code, and have # later calls to $req->param("foo") marked with its proper utf8 flags. -- Joe Schaefer