diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-05-29 01:34:31 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-05-29 01:34:31 -0500 |
commit | 04dfe92390c4f80db3c6672f75c233476affe847 (patch) | |
tree | 96b5fc87a38abe7ecefb080a8dd8f494bd293d86 | |
parent | 1ce2f2c8f0c44f345fe83a43de91fc094e5a8260 (diff) | |
download | reply-04dfe92390c4f80db3c6672f75c233476affe847.tar.gz reply-04dfe92390c4f80db3c6672f75c233476affe847.zip |
don't call eval in the context of strict and warnings
-rw-r--r-- | lib/App/REPL/Plugin/Defaults.pm | 6 |
1 files changed, 5 insertions, 1 deletions
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 { |