X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMoo.git;a=blobdiff_plain;f=lib%2FSub%2FQuote.pm;h=8016b06f15886455912df4305a61337ebe7859ef;hp=bd75a3ab9335f5550f9cff4d383fb4a61cc4bee9;hb=350f2de6ebd85fd6fc5699c0773e6737756bac36;hpb=c600e70640098ae6ad958dc7a07187464abd37d3 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];