2 |
## $Id$ |
## $Id$ |
3 |
## -------------------------------------------------------------------------------- |
## -------------------------------------------------------------------------------- |
4 |
## $Log$ |
## $Log$ |
5 |
|
## Revision 1.5 2003/03/27 15:17:05 joko |
6 |
|
## namespace fixes for Data::Mungle::* |
7 |
|
## |
8 |
|
## Revision 1.4 2002/12/19 01:06:27 joko |
9 |
|
## + fixed isEmpty with ARRAYs |
10 |
|
## |
11 |
## Revision 1.3 2002/12/13 21:47:04 joko |
## Revision 1.3 2002/12/13 21:47:04 joko |
12 |
## + fixes to 'sub isEmpty' |
## + fixes to 'sub isEmpty' |
13 |
## |
## |
20 |
## -------------------------------------------------------------------------------- |
## -------------------------------------------------------------------------------- |
21 |
|
|
22 |
|
|
23 |
package Data::Compare::Struct; |
package Data::Mungle::Compare::Struct; |
24 |
|
|
25 |
use strict; |
use strict; |
26 |
use warnings; |
use warnings; |
110 |
my $isReallyEmpty = ($#arr == -1 ? 1 : 0); |
my $isReallyEmpty = ($#arr == -1 ? 1 : 0); |
111 |
return 1 if $isReallyEmpty; |
return 1 if $isReallyEmpty; |
112 |
$found = 1; |
$found = 1; |
113 |
foreach (@$var) { |
foreach (@arr) { |
114 |
return 0 if defined $_; |
#return 0 if defined $_; |
115 |
|
#return 1 if isEmpty($_); |
116 |
|
return 0 if !isEmpty($_); |
117 |
} |
} |
118 |
|
|
119 |
} elsif ($reftype eq 'HASH') { |
} elsif ($reftype eq 'HASH') { |
151 |
print "isEmpty could not parse variable ( ref $ref reftype $reftype )", "\n"; |
print "isEmpty could not parse variable ( ref $ref reftype $reftype )", "\n"; |
152 |
} |
} |
153 |
|
|
154 |
|
#print "EMPTY!!!", "\n"; |
155 |
|
|
156 |
return 1; |
return 1; |
157 |
|
|
158 |
} |
} |