2 |
## $Id$ |
## $Id$ |
3 |
## -------------------------------------------------------------------------------- |
## -------------------------------------------------------------------------------- |
4 |
## $Log$ |
## $Log$ |
5 |
|
## Revision 1.4 2002/12/19 01:06:27 joko |
6 |
|
## + fixed isEmpty with ARRAYs |
7 |
|
## |
8 |
## Revision 1.3 2002/12/13 21:47:04 joko |
## Revision 1.3 2002/12/13 21:47:04 joko |
9 |
## + fixes to 'sub isEmpty' |
## + fixes to 'sub isEmpty' |
10 |
## |
## |
107 |
my $isReallyEmpty = ($#arr == -1 ? 1 : 0); |
my $isReallyEmpty = ($#arr == -1 ? 1 : 0); |
108 |
return 1 if $isReallyEmpty; |
return 1 if $isReallyEmpty; |
109 |
$found = 1; |
$found = 1; |
110 |
foreach (@$var) { |
foreach (@arr) { |
111 |
return 0 if defined $_; |
#return 0 if defined $_; |
112 |
|
#return 1 if isEmpty($_); |
113 |
|
return 0 if !isEmpty($_); |
114 |
} |
} |
115 |
|
|
116 |
} elsif ($reftype eq 'HASH') { |
} elsif ($reftype eq 'HASH') { |
148 |
print "isEmpty could not parse variable ( ref $ref reftype $reftype )", "\n"; |
print "isEmpty could not parse variable ( ref $ref reftype $reftype )", "\n"; |
149 |
} |
} |
150 |
|
|
151 |
|
#print "EMPTY!!!", "\n"; |
152 |
|
|
153 |
return 1; |
return 1; |
154 |
|
|
155 |
} |
} |