From: Matt S Trout Date: Sun, 7 Nov 2010 02:36:35 +0000 (+0000) Subject: clean up quote debugging output X-Git-Tag: 0.009001~70 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e8b2bab671e091638fcf27ef3f84d83cb965c459;p=gitmo%2FMoo.git clean up quote debugging output --- diff --git a/lib/Sub/Quote.pm b/lib/Sub/Quote.pm index 17e1215..485f6d3 100644 --- a/lib/Sub/Quote.pm +++ b/lib/Sub/Quote.pm @@ -55,12 +55,16 @@ sub _unquote_all_outstanding { $assembled_code .= $make_sub; } if (@localize_these) { + $ENV{SUB_QUOTE_DEBUG} && warn + "# localizing: ".join(', ', @localize_these)."\n" + .$assembled_code; $assembled_code = join("\n", (map { "local *${_};" } @localize_these), 'eval '.perlstring $assembled_code ); + } else { + $ENV{SUB_QUOTE_DEBUG} && warn $assembled_code; } - $ENV{SUB_QUOTE_DEBUG} && warn $assembled_code; _clean_eval $assembled_code, \@assembled_captures; if ($@) { die "Eval went very, very wrong:\n\n${assembled_code}\n\n$@";