Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 51088 invoked from network); 15 Jan 2007 23:08:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Jan 2007 23:08:10 -0000 Received: (qmail 22395 invoked by uid 500); 15 Jan 2007 23:08:11 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 22371 invoked by uid 500); 15 Jan 2007 23:08:11 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 22360 invoked by uid 99); 15 Jan 2007 23:08:11 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jan 2007 15:08:11 -0800 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jan 2007 15:08:01 -0800 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1H6avR-00018W-TO for modperl@perl.apache.org; Mon, 15 Jan 2007 15:07:37 -0800 Message-ID: <8381305.post@talk.nabble.com> Date: Mon, 15 Jan 2007 15:07:37 -0800 (PST) From: Tracy12 To: modperl@perl.apache.org Subject: Re: Test fails/Functionality works In-Reply-To: <1168881882.22060.48.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: j_lalith@yahoo.com References: <8368295.post@talk.nabble.com> <1168881882.22060.48.camel@localhost.localdomain> X-Virus-Checked: Checked by ClamAV on apache.org 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 Error I got was Can't locate object method "user" via package "Apache2::Connection 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.? This all happens when I comment the line use Apache2::compat; Good thing is make test gives zero errors. How can I preserve existing written old code also make sure make test gives zero errors. How can I find the corresponing mappings for old vs new perl versions. Even though the functionality works in my case make test fails because of the above line Apache2::compat; Thanks Perrin Harkins wrote: > > On Mon, 2007-01-15 at 00:51 -0800, Tracy12 wrote: >> I found out that the reason for failure is the following line >> >> use Apache2::compat; > > You didn't tell us what the error message is when you have that line in. > Regardless, you shouldn't use Apache2::compat for new development. It's > meant for porting old code. > >> but when I remove this entry the make test gives no errors but >> functionality >> fails and in the log it says that >> Can't locate object method "user" via package "Apache2::Connection" at >> /usr/lib/perl5/site_perl/5.8.8/AuthCAS.pm line 512.\n >> >> which is basically $r->connection->user($user); >> line in the source. > > You should be using $r->user($user) there. > > - Perrin > > > -- View this message in context: http://www.nabble.com/Test-fails-Functionality-works-tf3013373.html#a8381305 Sent from the mod_perl - General mailing list archive at Nabble.com.