projects
/
gitmo/Moo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
correct captures assignment in quote_sub
[gitmo/Moo.git]
/
lib
/
Sub
/
Quote.pm
diff --git
a/lib/Sub/Quote.pm
b/lib/Sub/Quote.pm
index
bd75a3a
..
8016b06
100644
(file)
--- 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];