劉康民 > Kwiki-Session-0.01 > Kwiki::Session

Download:
Kwiki-Session-0.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  

NAME ^

  Kwiki::Session - Session support in your Kwiki plugin

SYNOPSIS ^

    # Install Kwiki::Session as a plugin
    > kwiki -add Kwiki::Sesssion

    # Return a CGI::Session object
    my $session = $self->hub->session->load;

DESCRIPTION ^

This class help out when a Kwiki plugin writer wants session support. It has only one method called "load", which will automatically recover the correct session id, and create one if necessary. "load" method returns a CGI::Session object, so please read the documentation in CGI::Session in order to use this object.

Please that, this module itself is also a kwiki plugin, and has to be installed to your kwiki site if you want your own module to use it very easily. If you put "Kwiki::Session" in your "plugins" file, you can just use this line to retrieve your session:

    my $session = $self->hub->session->load;

Otherwise, it would take like this long to load it:

    sub init {
        $self->hub->config->add_field('session' => 'Kwiki::Session');
    }

For simple purpose, just put "Kwiki::Session" into your "plugins" file. It doesn't provide any extra actions or widgets or any templates, just convienent access programming interface.

SEE ALSO ^

CGI::Session

COPYRIGHT ^

Copyright 2005 by Kang-min Liu <gugod@gugod.org>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See <http://www.perl.com/perl/misc/Artistic.html>

syntax highlighting: