Mailing List Archive

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 [ In reply to ]
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
>
Re: Can't call method "DeleteSession" on an undefined value [ In reply to ]
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