projects
/
catagits/Web-Session.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
3d92cf4
)
use TMPDIR env if it's defined in Store::File
Tatsuhiko Miyagawa [Sun, 13 Dec 2009 03:08:32 +0000 (19:08 -0800)]
lib/Plack/Middleware/Session.pm
patch
|
blob
|
blame
|
history
lib/Plack/Session/Store/File.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Plack/Middleware/Session.pm
b/lib/Plack/Middleware/Session.pm
index
9bbe61c
..
a7433d1
100644
(file)
--- a/
lib/Plack/Middleware/Session.pm
+++ b/
lib/Plack/Middleware/Session.pm
@@
-54,7
+54,6
@@
Plack::Middleware::Session - Middleware for session management
=head1 SYNOPSIS
use Plack::Builder;
- use Plack::Middleware::Session;
my $app = sub {
return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello Foo' ] ];
diff --git
a/lib/Plack/Session/Store/File.pm
b/lib/Plack/Session/Store/File.pm
index
63b569e
..
8da664c
100644
(file)
--- a/
lib/Plack/Session/Store/File.pm
+++ b/
lib/Plack/Session/Store/File.pm
@@
-15,7
+15,7
@@
use Plack::Util::Accessor qw[
sub new {
my ($class, %params) = @_;
- $params{'dir'} ||= '/tmp';
+ $params{'dir'} ||= $ENV{TMPDIR} || '/tmp';
die "Storage directory (" . $params{'dir'} . ") is not writeable"
unless -w $params{'dir'};