Hey guys,

So another question if I may.  I'm an experienced perl programmer, but
I didn't know about attributes until I installed maypole.

So, I want to add a logout() method, i.e.:

    sub logout : Exported {
            my ($class, $r) = @_;
            # Remove the user from the request object
            my $user = delete $r->{user};
            # Destroy the session
            tied(%{$r->{session}})->delete;
            # Send a new cookie which expires the previous one
            my $cookie = Apache::Cookie->new($r->{ar},
                -name => $r->config->{auth}{cookie_name},
                -value => undef,
                -path => "/"
                -expires => "-10m"
            );
            $cookie->bake();
            # Template switcheroo
            $r->template("frontpage");
    }

which I have added to my toplevel class, i.e. BeerDB.pm, but I get
this error in the browser:

    Invalid CODE attribute: Exported at BeerDB.pm line 52

Do I need to do anything special?  I'm starting the module off with:

    use Maypole::Constants;
    use Maypole::Application qw(Authentication::UserSessionCookie);

Joe
-- 
Josef Karthauser ([EMAIL PROTECTED])           http://www.josef-k.net/
Physics Particle Theory (student)   http://www.pact.cpes.sussex.ac.uk/
================ An eclectic mix of fact and theory. =================

Attachment: pgpy1etNXLMhk.pgp
Description: PGP signature

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Maypole-users mailing list
Maypole-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maypole-users

Reply via email to