Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Embperl

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

 

 

ModPerl embperl RSS feed   Index | Next | Previous | View Threaded


Jeremy at Malcolm

May 2, 2008, 6:41 AM

Post #1 of 3 (2177 views)
Permalink
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 [at] perl
For additional commands, e-mail: embperl-help [at] perl


pete at uniplexds

May 2, 2008, 6:48 AM

Post #2 of 3 (2035 views)
Permalink
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 [at] perl
> For additional commands, e-mail: embperl-help [at] perl
>


Jeremy at Malcolm

May 2, 2008, 6:54 AM

Post #3 of 3 (2037 views)
Permalink
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 [at] perl
For additional commands, e-mail: embperl-help [at] perl

ModPerl embperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.