pre-0.02 commit
[catagits/Web-Session.git] / lib / Plack / Session / Store.pm
index 572730b..0f87ce6 100644 (file)
@@ -2,6 +2,9 @@ package Plack::Session::Store;
 use strict;
 use warnings;
 
+our $VERSION   = '0.02';
+our $AUTHORITY = 'cpan:STEVAN';
+
 use Plack::Util::Accessor qw[ _stash ];
 
 sub new {
@@ -35,6 +38,11 @@ sub persist {
     ()
 }
 
+sub dump_session {
+    my ($self, $session_id) = @_;
+    $self->_stash->{ $session_id } || {};
+}
+
 1;
 
 __END__
@@ -113,6 +121,12 @@ instance or an object with an equivalent interface.
 This method is called by the L<Plack::Session> C<expire> method and
 is used to remove any session data.
 
+=item B<dump_session ( $session_id )>
+
+This method is mostly for debugging purposes, it will always return
+a HASH ref, even if no data is actually being stored (in which case
+the HASH ref will be empty).
+
 =back
 
 =head1 BUGS