--- nfo/perl/libs/Data/Mungle/Compare/Struct.pm 2002/12/13 21:47:04 1.3 +++ nfo/perl/libs/Data/Mungle/Compare/Struct.pm 2002/12/19 01:06:27 1.4 @@ -1,7 +1,10 @@ ## -------------------------------------------------------------------------------- -## $Id: Struct.pm,v 1.3 2002/12/13 21:47:04 joko Exp $ +## $Id: Struct.pm,v 1.4 2002/12/19 01:06:27 joko Exp $ ## -------------------------------------------------------------------------------- ## $Log: Struct.pm,v $ +## Revision 1.4 2002/12/19 01:06:27 joko +## + fixed isEmpty with ARRAYs +## ## Revision 1.3 2002/12/13 21:47:04 joko ## + fixes to 'sub isEmpty' ## @@ -104,8 +107,10 @@ my $isReallyEmpty = ($#arr == -1 ? 1 : 0); return 1 if $isReallyEmpty; $found = 1; - foreach (@$var) { - return 0 if defined $_; + foreach (@arr) { + #return 0 if defined $_; + #return 1 if isEmpty($_); + return 0 if !isEmpty($_); } } elsif ($reftype eq 'HASH') { @@ -143,6 +148,8 @@ print "isEmpty could not parse variable ( ref $ref reftype $reftype )", "\n"; } + #print "EMPTY!!!", "\n"; + return 1; }