Permalink
Browse files

reinstate bigpresh's Clone solution - introduce Clone in it

  • Loading branch information...
xsawyerx committed Aug 22, 2012
1 parent a1b9cc5 commit 662a622af7aed2db394b288b9052954e30d808eb
Showing with 6 additions and 5 deletions.
  1. +1 −0 Makefile.PL
  2. +5 −5 lib/Dancer/Template/Abstract.pm
View
@@ -48,6 +48,7 @@ WriteMakefile1(
'MIME::Types' => '0',
'URI' => '1.59',
'Try::Tiny' => '0.09',
+ 'Clone' => '0',
# core
'File::Basename' => '0',
@@ -3,7 +3,7 @@ package Dancer::Template::Abstract;
use strict;
use warnings;
use Carp;
-use Storable 'dclone';
+use Clone;
use Dancer::Logger;
use Dancer::Factory::Hook;
@@ -146,18 +146,18 @@ sub _prepare_tokens_options {
$tokens ||= {};
$tokens->{perl_version} = $];
$tokens->{dancer_version} = $Dancer::VERSION;
- $tokens->{settings} = dclone(Dancer::Config->settings);
+ $tokens->{settings} = Clone::clone(Dancer::Config->settings);
# If we're processing a request, also add the request object, params and
# vars as tokens:
if (my $request = Dancer::SharedData->request) {
$tokens->{request} = $request;
- $tokens->{params} = dclone($request->params);
- $tokens->{vars} = dclone(Dancer::SharedData->vars);
+ $tokens->{params} = Clone::clone($request->params);
+ $tokens->{vars} = Clone::clone(Dancer::SharedData->vars);
}
Dancer::App->current->setting('session')
- and $tokens->{session} = dclone(Dancer::Session->get);
+ and $tokens->{session} = Clone::clone(Dancer::Session->get);
return ($tokens, $options);
}

0 comments on commit 662a622

Please sign in to comment.