Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Revert "Switching from != undef to check against defined to avoid war…

…nings"

* The previous commit looks logically benign but actually
	breaks one of the tests. Reverting until we can find
	another way to avoid the warning it attempted to remove.

This reverts commit 572f10a.
  • Loading branch information...
commit 50b045c8b41731a7d0f54ec5320a5569935212af 1 parent 572f10a
masukomi authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  lib/JSONPath.pm
2  lib/JSONPath.pm
@@ -164,7 +164,7 @@ sub trace(){
164 164 if (! $reserved_loc and $ref_type eq 'HASH' and ($obj and exists $obj->{$loc}) ){
165 165 #$self->logit( "tracing loc($loc) obj (hash)?");
166 166 $self->trace($x_string, $obj->{$loc}, $path . ';' . $loc);
167   - } elsif (! $reserved_loc and $ref_type eq 'ARRAY' and ($loc =~ m/^\d+$/ and $#{$obj} >= $loc and defined $obj->[$loc]) ) {
  167 + } elsif (! $reserved_loc and $ref_type eq 'ARRAY' and ($loc =~ m/^\d+$/ and $#{$obj} >= $loc and $obj->[$loc] != undef) ) {
168 168 $self->trace($x_string, $obj->[$loc], $path . ';' . $loc);
169 169
170 170 } elsif ($loc eq '*'){

0 comments on commit 50b045c

Please sign in to comment.
Something went wrong with that request. Please try again.