projects
/
dbsrgits/Data-Query.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
790d0b6
)
only default in $_ if @_ is empty, not if $_[0] exists but is undef
Matt S Trout [Wed, 9 Oct 2013 18:18:17 +0000 (18:18 +0000)]
lib/Data/Query/ExprHelpers.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Data/Query/ExprHelpers.pm
b/lib/Data/Query/ExprHelpers.pm
index
399a8e2
..
b6df568
100644
(file)
--- a/
lib/Data/Query/ExprHelpers.pm
+++ b/
lib/Data/Query/ExprHelpers.pm
@@
-72,7
+72,7
@@
foreach my $name (values %Data::Query::Constants::CONST) {
no strict 'refs';
my $sub = "is_${name}";
*$sub = sub {
- my $dq = $_[0]||$_;
+ my $dq = @_ ? $_[0] : $_;
$dq->{type} and $dq->{type} eq $name
};
push @EXPORT, $sub;