[libweb-mrest-perl] 01/16: Refrain from munging Plack::Session object
Jonas Smedegaard
dr at jones.dk
Wed Dec 6 01:59:41 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag debian/0.288-1
in repository libweb-mrest-perl.
commit b70449fdd5ed2b37debba806e3487df73c211f10
Author: Nathan Cutler <ncutler at suse.com>
Date: Sat Feb 25 03:24:23 2017 +0100
Refrain from munging Plack::Session object
Signed-off-by: Nathan Cutler <ncutler at suse.com>
---
Build.PL | 2 --
bin/mrest | 2 +-
lib/Web/MREST/Resource.pm | 2 +-
lib/Web/MREST/Util.pm | 30 ------------------------------
4 files changed, 2 insertions(+), 34 deletions(-)
diff --git a/Build.PL b/Build.PL
index c1ba8c1..cb344b0 100644
--- a/Build.PL
+++ b/Build.PL
@@ -43,7 +43,6 @@ my $builder = Module::Build->new(
'Module::Runtime' => 0,
'Params::Validate' => 0,
'Path::Router' => 0.12,
- 'Plack::Session' => 0,
'Plack' => 1.0031,
'Plack::Test' => 0,
'Pod::Simple::HTML' => 0,
@@ -76,7 +75,6 @@ my $builder = Module::Build->new(
'Plack::Middleware::Session' => 0,
'Plack::Middleware::StackTrace' => 0,
'Plack::Runner' => 0,
- 'Plack::Session' => 0,
'Pod::Simple::HTML' => 0,
'Pod::Simple::Text' => 0,
'Pod::Usage' => 0,
diff --git a/bin/mrest b/bin/mrest
index 60cfe24..03767ce 100644
--- a/bin/mrest
+++ b/bin/mrest
@@ -238,7 +238,7 @@ $runner->run(
$log->$level( $message );
};
# enable "StackTrace", force => 1;
- enable "Session";
+ enable "Session", store => 'File';
enable "Static", path => qr{/favicon}, root => $distro_sharedir;
$app;
}
diff --git a/lib/Web/MREST/Resource.pm b/lib/Web/MREST/Resource.pm
index 58d31c8..adfcaec 100644
--- a/lib/Web/MREST/Resource.pm
+++ b/lib/Web/MREST/Resource.pm
@@ -1,5 +1,5 @@
# *************************************************************************
-# Copyright (c) 2014-2015-2015, SUSE LLC
+# Copyright (c) 2014-2016, SUSE LLC
#
# All rights reserved.
#
diff --git a/lib/Web/MREST/Util.pm b/lib/Web/MREST/Util.pm
index 93d29fa..f1e14a3 100644
--- a/lib/Web/MREST/Util.pm
+++ b/lib/Web/MREST/Util.pm
@@ -40,7 +40,6 @@ use App::CELL qw( $log );
use File::Spec;
use JSON;
use Params::Validate qw( :all );
-use Plack::Session;
use Pod::Simple::HTML;
use Pod::Simple::Text;
@@ -72,8 +71,6 @@ This module provides the following exports:
=item C<$JSON> (singleton)
-=item C<get_session> (function)
-
=item C<pod_to_html> (function)
=item C<pod_to_text> (function)
@@ -85,7 +82,6 @@ This module provides the following exports:
use Exporter qw( import );
our @EXPORT_OK = qw(
$JSON
- get_session
pod_to_html
pod_to_text
);
@@ -142,30 +138,4 @@ sub pod_to_text {
}
-=head2 get_session
-
-Given a Plack environment (hashref), returns session object. If there is no
-session object in the environment, it creates one.
-
-Returns: nothing
-
-=cut
-
-sub get_session {
- my ( $env ) = validate_pos( @_, { type => HASHREF } );
- my $session;
-
- if ( ${ $env->{'psgix.session'} } ) {
- $session = $env->{'psgix.session'};
- $log->info( "Plack environment already contains session " . $session->id );
- } else {
- $session = Plack::Session->new( $env );
- $log->info( "Session missing in Plack environment; created new session " . $session->id );
- }
-
- die "Dying in Web::MREST::Util::get_session because Plack environment still doesn't have a psgix.session property" unless ${ $env->{'psgix.session'} };
-
- return;
-}
-
1;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libweb-mrest-perl.git
More information about the Pkg-perl-cvs-commits
mailing list