| HTTP-Session documentation | Contained in the HTTP-Session distribution. |
HTTP::Session::State::Test - state module for testing
HTTP::Session->new(
state => HTTP::Session::State::Test->new(
session_id => 'foobar',
),
store => ...,
request => ...,
);
This is an mock object for testing session.
dummy session id
for internal use only
| HTTP-Session documentation | Contained in the HTTP-Session distribution. |
package HTTP::Session::State::Test; use strict; use HTTP::Session::State::Base; __PACKAGE__->mk_ro_accessors(qw/session_id/); sub new { my $class = shift; my %args = ref($_[0]) ? %{$_[0]} : @_; # check required parameters for (qw/session_id/) { Carp::croak "missing parameter $_" unless $args{$_}; } # set default values bless {%args}, $class; } sub get_session_id { my $self = shift; return $self->session_id; } sub response_filter { } 1; __END__