From 04dfe92390c4f80db3c6672f75c233476affe847 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 29 May 2013 01:34:31 -0500 Subject: don't call eval in the context of strict and warnings --- lib/App/REPL/Plugin/Defaults.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/App/REPL/Plugin/Defaults.pm b/lib/App/REPL/Plugin/Defaults.pm index 28eb346..ecc221b 100644 --- a/lib/App/REPL/Plugin/Defaults.pm +++ b/lib/App/REPL/Plugin/Defaults.pm @@ -1,4 +1,8 @@ package App::REPL::Plugin::Defaults; + +# don't pollute with strict and warnings for this module +sub _eval { eval($_[0]) } + use strict; use warnings; @@ -20,7 +24,7 @@ sub evaluate { my $self = shift; my ($next, $line) = @_; - return eval $line; + return _eval($line); } sub print_error { -- cgit v1.2.3-54-g00ecf