I've never played with mod_perl in my life ... but my reading of the docs you cite is that if you use Apache2::RequestUtil then it adds a a new method for Apache2::RequestRec ... but you still have to specify some args (namely a connection)
(your first example code doesn't use Apache2::RequestUtil, your second example doesn't pass any args to Apache2::RequestRec->new() and you don't specify what kind of error you get)
Then again, i could be totally wrong.
You might also want to google unit test mod_perl code ... that turned up several promising looking links, many right here on perlmonks.
In reply to Re: Where can I buy an $r with which to test Apache2::Cookie?
by hossman
in thread Where can I buy an $r with which to test Apache2::Cookie?
by frostman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |