Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More fixes for undef values.

  • Loading branch information...
commit 56495f2ac66a6fea5f38a8168a2aa3cd4cef12e7 1 parent 6f80fb2
@davorg authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/Array/Compare.pm
View
9 lib/Array/Compare.pm
@@ -406,6 +406,15 @@ sub full_compare {
next if keys %{$self->Skip} && $self->Skip->{$_};
my ($val1, $val2) = ($arr1->[$_], $arr2->[$_]);
+
+ next unless defined $val1 or defined $val2;
+
+ if ((defined $val1 and not defined $val2)
+ or (defined $val2 and not defined $val1)) {
+ push @diffs, $_;
+ next;
+ }
+
unless ($self->WhiteSpace) {
$val1 =~ s/\s+/ /g;
$val2 =~ s/\s+/ /g;
Please sign in to comment.
Something went wrong with that request. Please try again.