From: Jesse Luehrs Date: Thu, 27 Jan 2011 04:53:51 +0000 (-0600) Subject: some cleanups X-Git-Tag: 0.02~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c8d4a65f440c760f740055fb38b728c67ba26245;p=gitmo%2FEval-Closure.git some cleanups --- diff --git a/lib/Eval/Closure.pm b/lib/Eval/Closure.pm index 0bb553e..01e1411 100644 --- a/lib/Eval/Closure.pm +++ b/lib/Eval/Closure.pm @@ -86,7 +86,7 @@ foo at MyClass.pm, line 123"). =item line This lets you override the particular line number that appears in backtraces, -much like the description option. The default is "1". +much like the C option. The default is 1. =item terse_error @@ -104,7 +104,8 @@ sub eval_closure { $args{source} = _canonicalize_source($args{source}); _validate_env($args{environment} ||= {}); - $args{source} = _line_directive(@args{qw(line description)}) . $args{source} + $args{source} = _line_directive(@args{qw(line description)}) + . $args{source} if defined $args{description}; my ($code, $e) = _clean_eval_closure(@args{qw(source environment)}); @@ -164,7 +165,7 @@ sub _validate_env { sub _line_directive { my ($line, $description) = @_; - $line = 1 if !defined($line); + $line = 1 unless defined($line); return qq{#line $line "$description"\n}; }