From 582354db4c7667d0b7dee472a59ab55ef4be6cc7 Mon Sep 17 00:00:00 2001 From: Alexis Sukrieh Date: Fri, 29 Jan 2010 18:15:16 +0100 Subject: [PATCH] Dancer::Session cleaning --- lib/Dancer/Session.pm | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/Dancer/Session.pm b/lib/Dancer/Session.pm index 342906551..1ae687d06 100644 --- a/lib/Dancer/Session.pm +++ b/lib/Dancer/Session.pm @@ -10,16 +10,6 @@ use Dancer::Config 'setting'; my $ENGINE = undef; sub engine {$ENGINE} -sub set_engine { - my ($engine) = @_; - $ENGINE = $engine; - eval "use $ENGINE"; - die "Unable to load session engine `$ENGINE': $@" if $@; - engine->init(); -} - -sub get { get_current_session() } - # This wrapper look for the session engine and try to load it. sub init { my ($class, $setting) = @_; @@ -48,6 +38,8 @@ sub get_current_session { return $session; } +sub get { get_current_session() } + sub read { my ($class, $key) = @_; my $session = get_current_session();