perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maxim Sloyko <m.slo...@mostcom.ru>
Subject Re: Error
Date Tue, 26 Apr 2005 05:12:40 GMT
Cure wrote:

>
> 	
>
> 	
>
> *error:*  	Can't call method "fetch" on an undefined value at 
> /usr/home/cwarner/www/html/test/cookie_test.html line 9.
> *context:*  	
> *...*  	
> *5:*  	use Apache::Cookie;
> *6:*  	
> *7:*  	##
> *8:*  	my $cookie = Apache::Cookie->new($r);
> *9:*  	my $cookie_id = $cookie->fetch;
>
>
>
> <-- This use to work in mod_perl1. I'm currently using mod_perl2 and 
> it doesn't work. :(
>
> Using apache-2.0.54 + mod_perl2-2.0.0r3,1
>
>
>
> Cure

use Apache::Cookie::Jar (no need to "use" it in perlish way though, only 
Apache::Cookie) as this


    my $j = Apache::Cookie::Jar->new($r);
    my $id = $j->cookie("SESSION_ID")->value;

Hope this helps.

--
Maxim Sloyko


Mime
View raw message