From: Jesse Luehrs Date: Wed, 20 Oct 2010 21:07:36 +0000 (-0500) Subject: heh, oops X-Git-Tag: 0.01~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b3bd5eb84e7a0251075360a04fd7e76a42815bcd;p=gitmo%2FEval-Closure.git heh, oops --- diff --git a/lib/Eval/Closure.pm b/lib/Eval/Closure.pm index 719701d..c2a4387 100644 --- a/lib/Eval/Closure.pm +++ b/lib/Eval/Closure.pm @@ -1,4 +1,6 @@ package Eval::Closure; +use strict; +use warnings; use Sub::Exporter -setup => { exports => [qw(eval_closure)], groups => { default => [qw(eval_closure)] }, @@ -56,7 +58,7 @@ sub _validate_env { unless reftype($env) eq 'HASH'; for my $var (keys %$env) { - croak("Environment key '$_' should start with \@, \%, or \$") + croak("Environment key '$var' should start with \@, \%, or \$") unless $var =~ /^([\@\%\$])/; croak("Environment values must be references, not $env->{$var}") unless ref($env->{$var});