projects
/
gitmo/Moo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
c600e70
)
correct captures assignment in quote_sub
Graham Knop [Sun, 22 Sep 2013 07:58:02 +0000 (
03:58
-0400)]
lib/Sub/Quote.pm
patch
|
blob
|
blame
|
history
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];