From: Stevan Little Date: Sat, 12 Dec 2009 17:01:23 +0000 (-0500) Subject: adding Makefile.PL, Changes, README and such X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FWeb-Session.git;a=commitdiff_plain;h=3b4205cd1408fb5cb1c426a982eb521265e3d49f adding Makefile.PL, Changes, README and such --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ca0973 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.DS_Store + diff --git a/Changes b/Changes new file mode 100644 index 0000000..dba9441 --- /dev/null +++ b/Changes @@ -0,0 +1,4 @@ +Revision history for Perl extension Plack::Session + +0.01 + - original version \ No newline at end of file diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP new file mode 100644 index 0000000..e36f7b4 --- /dev/null +++ b/MANIFEST.SKIP @@ -0,0 +1,20 @@ +^_build +^Build$ +^blib +~$ +\.bak$ +^MANIFEST\.SKIP$ +CVS +\.svn +\.git +\.DS_Store +cover_db +\..*\.sw.?$ +^Makefile$ +^pm_to_blib$ +^MakeMaker-\d +^blibdirs$ +\.old$ +^#.*#$ +^\.# +^TODO$ \ No newline at end of file diff --git a/Makefile.PL b/Makefile.PL new file mode 100644 index 0000000..25064c5 --- /dev/null +++ b/Makefile.PL @@ -0,0 +1,23 @@ +use strict; +use warnings; +use inc::Module::Install; + +name 'Plack-Session'; +all_from 'lib/Plack/Session.pm'; +license 'perl'; + +# prereqs +requires 'Plack' => '0.9021'; +requires 'Plack::Request' => '0.08'; + +# for session ID gen +requires 'Digest::SHA' => '0'; + +# things the tests need +build_requires 'Test::More' => '0.88'; + +tests_recursive; +auto_install; + +WriteAll(); + diff --git a/README b/README new file mode 100644 index 0000000..4f2ba16 --- /dev/null +++ b/README @@ -0,0 +1,33 @@ +Plack::Session version 0.01 +=========================== + +See the individual module documentation for more information + +INSTALLATION + +To install this module type the following: + + perl Makefile.PL + make + make test + make install + +DEPENDENCIES + +This module requires these other modules and libraries: + + Plack + Plack::Request + Digest::SHA + +COPYRIGHT AND LICENCE + +Stevan Little + +Copyright 2009 Infinity Interactive, Inc. + +http://www.iinteractive.com + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + diff --git a/lib/Plack/Session/State.pm b/lib/Plack/Session/State.pm index 9b8314f..440be43 100644 --- a/lib/Plack/Session/State.pm +++ b/lib/Plack/Session/State.pm @@ -2,6 +2,8 @@ package Plack::Session::State; use strict; use warnings; +use Digest::SHA1 (); + use Plack::Util::Accessor qw[ session_key sid_generator @@ -13,7 +15,6 @@ sub new { $params{'_expired'} ||= +{}; $params{'session_key'} ||= 'plack_session'; $params{'sid_generator'} ||= sub { - require Digest::SHA1; Digest::SHA1::sha1_hex(rand() . $$ . {} . time) };