From: Graham Knop Date: Sun, 22 Sep 2013 07:58:02 +0000 (-0400) Subject: correct captures assignment in quote_sub X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=350f2de6ebd85fd6fc5699c0773e6737756bac36;p=gitmo%2FMoo.git correct captures assignment in quote_sub --- diff --git a/lib/Sub/Quote.pm b/lib/Sub/Quote.pm index bd75a3a..8016b06 100644 --- a/lib/Sub/Quote.pm +++ b/lib/Sub/Quote.pm @@ -59,7 +59,7 @@ sub quote_sub { (ref($_[-1]) eq 'HASH' and ref($_[-2]) eq 'HASH') ? pop : {}; - my $captures = pop if ref($_[-1]) eq 'HASH'; + my $captures = ref($_[-1]) eq 'HASH' ? pop : undef; undef($captures) if $captures && !keys %$captures; my $code = pop; my $name = $_[0];