On Mon, 2007-01-15 at 15:07 -0800, Tracy12 wrote: > I am modifying (adding new functions) to already written perl module, > > So this is not a complete new development. I am using mod_perl 2.0 /Apache > 2.2 on Fedora, Looks like code is not written for this but for a older > mod_perl version less than 2.0
I would guess it was written for mod_perl 1.24 or earlier, since that connection->user() method was deprecated all the way back then. > but if I change it to $r->user($user) instead of > $r->connection->user($user) this looks ok but it gives further errors > on Can't locate object method "header_out" via package > "Apache2::RequestRec" in the line $r->header_out->set(Location => > $url_new); Is this needs to be changed as well.? Yes. Lots of things will need to be changed. You're using the mod_perl 1 API on mod_perl 2. You can try using the Apache2::compat module to get it running if you don't want to bother rewriting it for mod_perl 2. This is all documented here: http://perl.apache.org/docs/2.0/user/porting/porting.html http://perl.apache.org/docs/2.0/user/porting/compat.html Please check these for information on any further errors you receive while porting before asking the list. > This all happens when I comment the line use Apache2::compat; You never explained why you removed that. It sounds like you should keep it, if you just want to port some old code in a hurry. - Perrin