You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Jeremy Malcolm <Je...@Malcolm.id.au> on 2008/05/02 15:41:01 UTC

Can't call method "DeleteSession" on an undefined value

Embperl's test document for DeleteSession, to delete the cookie and  
session data after it is finished with, uses this syntax:

$_[0] -> DeleteSession (1) ;

However when I use that in my Embperl::Object page using I get this  
message:

[9391]ERR: 24: Error in Perl code: Can't call method "DeleteSession"  
on an undefined value at /var/www/press/ordering.html line 158, <GEN0>  
line 4.

Any ideas?

TIA

-- 
Jeremy Malcolm LLB (Hons) B Com
Internet and Open Source lawyer, IT consultant, actor
host -t NAPTR 1.0.8.0.3.1.2.9.8.1.6.e164.org|awk -F! '{print $3}'


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Can't call method "DeleteSession" on an undefined value

Posted by Jeremy Malcolm <Je...@Malcolm.id.au>.
On 02/05/2008, at 9:48 PM, Pete Moran wrote:

> Try
>
> $epreq->DeleteSession(1);
>
> $_[0], $_[0] will only contain the epreq object if you havent  
> shifted off the array on the initial page. $epreq is the global  
> variable holding the internal embperl object.


Thanks for the quick reply.  That seemed to work, although the session  
file is still on disk with the same content.  Still, the cookie is  
gone from the browser.  Great!

-- 
Jeremy Malcolm LLB (Hons) B Com
Internet and Open Source lawyer, IT consultant, actor
host -t NAPTR 1.0.8.0.3.1.2.9.8.1.6.e164.org|awk -F! '{print $3}'


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Can't call method "DeleteSession" on an undefined value

Posted by Pete Moran <pe...@uniplexds.co.uk>.
Try

$epreq->DeleteSession(1);

$_[0], $_[0] will only contain the epreq object if you havent shifted  
off the array on the initial page. $epreq is the global variable  
holding the internal embperl object.

Pete
On 2 May 2008, at 14:41, Jeremy Malcolm wrote:

> Embperl's test document for DeleteSession, to delete the cookie and  
> session data after it is finished with, uses this syntax:
>
> $_[0] -> DeleteSession (1) ;
>
> However when I use that in my Embperl::Object page using I get this  
> message:
>
> [9391]ERR: 24: Error in Perl code: Can't call method "DeleteSession"  
> on an undefined value at /var/www/press/ordering.html line 158,  
> <GEN0> line 4.
>
> Any ideas?
>
> TIA
>
> -- 
> Jeremy Malcolm LLB (Hons) B Com
> Internet and Open Source lawyer, IT consultant, actor
> host -t NAPTR 1.0.8.0.3.1.2.9.8.1.6.e164.org|awk -F! '{print $3}'
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>