Everything working fine with the following entry
Apache2::compat as I stated.
but eventhough it works ' make test ' gave me a error but still I went ahead
and did make install.
When I comment(to get make test with no errors) the above line 'make test'
gives no errors but that is of no use as functionality does not work.
Error I am getting while executing make test is
all skipped: Test::Pod 1.14 required for testing POD
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/00.load.t 1 256 1 1 100.00% 1
2 tests skipped.
Failed 1/3 test scripts, 66.67% okay. 1/1 subtests failed, 0.00% okay.
make: *** [test_dynamic] Error 255
the 00.load.t looks as follows
use Test::More tests => 1;
BEGIN {
use_ok( 'AuthCAS' );
}
diag( "Testing AuthCAS $AuthCAS::VERSION" );
In order to get everything working I had to comment use strict as well.
Otherwise it gives me the following.
This is inside a new added function(hence I used Apache2::Const::OK) in side
the old code base.
failed to resolve handler `AuthCAS->authen_handler': Bareword
"Apache2::Const::OK" not allowed while "strict subs" in use at
/usr/lib/perl5/site_perl/5.8.8/AuthCAS.pm line 530.\nCompilation failed in
require at (eval 2) line 3.\n
Perrin Harkins wrote:
>
> 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
>
>
>
--
View this message in context:
http://www.nabble.com/Test-fails-Functionality-works-tf3013373.html#a8382424
Sent from the mod_perl - General mailing list archive at Nabble.com.