[prev] [thread] [next] [Date index for 2005/04/26]
This is a multi-part message in MIME format. --------------080300080406040400080608 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 --------------080300080406040400080608 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> Cure wrote: <blockquote cite="mid426D6D37.7000109@xxxxxxxx.xxx" type="cite"> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> <table border="0" cellpadding="1" cellspacing="0" height="50" width="1"> <tbody> <tr> <td align="left" nowrap="nowrap" valign="top"><br> </td> <td align="left" valign="top"><br> </td> </tr> <tr> <td align="left" nowrap="nowrap" valign="top"><br> </td> <td align="left" nowrap="nowrap" valign="top"><br> </td> </tr> </tbody> </table> <table border="0" cellpadding="1" cellspacing="0"> <tbody> <tr> <td align="left" nowrap="nowrap" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>error:</b> </font></td> <td align="left" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Can't call method "fetch" on an undefined value at /usr/home/cwarner/www/html/test/cookie_test.html line 9.<br> </font></td> </tr> <tr> <td align="left" nowrap="nowrap" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>context:</b> </font></td> <td align="left" nowrap="nowrap" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> <table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td align="left" nowrap="nowrap" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>...</b> </font></td> <td align="left" nowrap="nowrap" valign="top"><br> </td> </tr> <tr> <td align="left" nowrap="nowrap" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>5:</b> </font></td> <td align="left" nowrap="nowrap" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">use Apache::Cookie;</font></td> </tr> <tr> <td align="left" nowrap="nowrap" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>6:</b> </font></td> <td align="left" nowrap="nowrap" valign="top"><br> </td> </tr> <tr> <td align="left" nowrap="nowrap" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>7:</b> </font></td> <td align="left" nowrap="nowrap" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">##</font></td> </tr> <tr> <td align="left" nowrap="nowrap" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>8:</b> </font></td> <td align="left" nowrap="nowrap" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">my $cookie = Apache::Cookie->new($r);</font></td> </tr> <tr> <td align="left" nowrap="nowrap" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>9:</b> </font></td> <td align="left" nowrap="nowrap" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><font color="red">my $cookie_id = $cookie->fetch;</font></font></td> </tr> </tbody> </table> </font></td> </tr> </tbody> </table> <br> <br> <-- This use to work in mod_perl1. I'm currently using mod_perl2 and it doesn't work. :(<br> <br> Using apache-2.0.54 + mod_perl2-2.0.0r3,1<br> <br> <br> <br> Cure<br> </blockquote> use Apache::Cookie::Jar (no need to "use" it in perlish way though, only Apache::Cookie) as this<br> <br> <br> my $j = Apache::Cookie::Jar->new($r);<br> my $id = $j->cookie("SESSION_ID")->value;<br> <br> Hope this helps.<br> <br> --<br> Maxim Sloyko<br> <br> </body> </html> --------------080300080406040400080608--
![]() |
Error
|
![]() |
![]() |
Re: Error
|
Generated at 09:30 on 27 Apr 2005 by mariachi v0.52