GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  HTTP::SESSION (3)

.ds Aq ’

NAME

HTTP::Session - simple session

CONTENTS

SYNOPSIS



    use HTTP::Session;

    my $session = HTTP::Session->new(
        store   => HTTP::Session::Store::Memcached->new(
            memd => Cache::Memcached->new({
                servers => [127.0.0.1:11211],
            }),
        ),
        state   => HTTP::Session::State::Cookie->new(
            name => foo_sid
        ),
        request => $c->req,
    );



DESCRIPTION

Yet another session manager.

easy to integrate with PSGI =)

METHODS

my $session = HTTP::Session->new(store => $store, state => $state, request => $req) This method creates new instance of HTTP::Session.

store is instance of HTTP::Session::Store::*.

state is instance of HTTP::Session::State::*.

request is duck typed object.request object should have header, address, param. You can use PSGI’s $env instead.

$session->html_filter($html) filtering HTML
$session->redirect_filter($url) filtering redirect URL
$session->header_filter($res) filtering header
$session->response_filter($res) filtering response. this method runs html_filter, redirect_filter and header_filter.

$res should be PSGI’s response array, instance of HTTP::Response, or HTTP::Engine::Response.

$session->keys() keys of session.
$session->get(key) get session item
$session->set(key, val) set session item
$session->remove(key) remove item.
$session->as_hashref() session as hashref.
$session->expire() expire the session
$session->regenerate_session_id([$delete_old]) regenerate session id.remove old one when $delete_old is true value.
$session->finalize() commit the session data.

CLEANUP SESSION

Some storage doesn’t care the old session data.Please call $store->cleanup( $min ); manually.

AUTHOR

Tokuhiro Matsuno <tokuhirom AAJKLFJEF GMAIL COM>

THANKS TO



    kazuhooku
    amachang
    walf443
    yappo
    nekokak



REPOSITORY

I use github. repo url is here <http://github.com/tokuhirom/http-session/tree/master>

SEE ALSO

Catalyst::Plugin::Session, Sledge::Session

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 HTTP::SESSION (3) 2014-07-31

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.