perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinate Aramsangrungroj <>
Subject Can't call method "jar" without a package or object reference - mod_perl2
Date Sun, 02 Mar 2014 23:27:28 GMT

We have just installed Auth handler
(Apache ) using mod_perl2 and CAS. 

1. Initially, we had the Internal
Server Error "Expected token not present", as per these
below links suggested this could be because of our invalid cookie
format. But for our application to work, we need those cookies

So we changed as seen below 

Replace from 

my $jar = $req->jar or return;
return $jar->get(shift) if @_; 
return wantarray ? %$jar : $jar; 


my $jar = eval {$req->jar()} ||
$@->jar; #------------line 42 
return $jar->get(shift) if @_; 
return wantarray ? %$jar : $jar; 

My interpretation of the code in
line#42 is if there is some parsing error of cookie, ignore the error
and use that cookie anyway. 

2. This fixed the above error, all is
working fine in our internal network..we can browse the web
3. However, when we access the target
application from external via vpn and also with some browsers. We are
having below error 
Can't call method "jar"
without a package or object reference at

Can someone shed some light into this?

FYI, based on my troubleshooting and
investigation I can see that there is still cookie parsing error from
executing eval {$req->jar()} in line 42, but somehow $@ is
Hence calling $@->jar cause such an

Don't know why it is only failing in
certain conditions as explained? Could anyone suggest some direction
or a possible solution? 



View raw message