in reply to mod_perl 2 migration problems

What you're doing here (changing the actual input) is kind of a bad idea. It would be better to use some kind of internal data structure for passing around your processed parameters, maybe storing them in a hash in $r->pnotes().

Replies are listed 'Best First'.
Re^2: mod_perl 2 migration problems
by johnnywang (Priest) on Sep 14, 2006 at 16:43 UTC
    well, yes, but I'm working with someone else's code, and can't really re-write everything at the moment.
      Well, you have to change code that uses $r->args to parse the query string because that doesn't work anymore. See the porting doc for more info. You can set the complete query string with $r->args(), which might allow later code to see your parameter changes, or you might be able to use Apache2::Request and modify the params using the APR::Table API on the object it returns when you call it like this:
      my $table = $req->param;
      I'm not sure those changes are visible to anyone else though.
        great, that's what I did, just not sure whether that's the right/easy way. The doc says that the APR::Table is readonly, I guess I'll just manipulate the whole query string, then. Thanks.