On Apr 3, 2005 3:45 PM, RA Jones <[EMAIL PROTECTED]> wrote:
> Error executing run mode 'logout': Can't call method "query" on an
> undefined value at MyApp.pm line 36.

This doesn't mean that the query object has disappeared, it means that
you are calling the query method on an undefined value.  To translate
that into code, you are calling something like this
'$self->query->param(...)'.  This means is that you want to call the
query method on the $self object, but $self is undefined.  So somehow
the 'login' method has been called without passing in $self.  Most
likely 'login' was called as a function instead of as a method.

> sub logout { # called via link from web-page:
>   my $self = shift;
> 
>   $self->session->delete(); # delete session
>   $self->tt_params( username => undef ); # delete UserID param;
>         # tt_params_clear doesn't work!!
>   login(); # causes fatal error with query() undefined

Here is the problem.  You need to call login as a method call here:
  $self->login();

> Incidentally, as commented above, $self->tt_params_clear generates a
> server error, as this function doesn't appear to be recognised:

That should be $self->tt_clear_params.  It looks to be a documentation
problem.  I have fixed and it should be included in the next release
of the plugin.  thanks!

Cheers,

Cees

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to