Skip to content

Instantly share code, notes, and snippets.

@yappo
Created February 26, 2009 03:45
Show Gist options
  • Save yappo/70640 to your computer and use it in GitHub Desktop.
Save yappo/70640 to your computer and use it in GitHub Desktop.
Index: lib/HTTP/Session/Store/Test.pm
===================================================================
--- lib/HTTP/Session/Store/Test.pm (revision 30519)
+++ lib/HTTP/Session/Store/Test.pm (working copy)
@@ -3,6 +3,15 @@
use warnings;
use base qw/HTTP::Session::Store::OnMemory/;
+my $DATA = {};
+sub new {
+ my $class = shift;
+ my %args = ref($_[0]) ? %{$_[0]} : @_;
+ # set default values
+ $args{data} ||= $DATA;
+ bless {%args}, $class;
+}
+
1;
__END__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment