/[cvs]/nfo/perl/libs/Data/Mungle/Compare/Struct.pm
ViewVC logotype

Diff of /nfo/perl/libs/Data/Mungle/Compare/Struct.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by joko, Fri Dec 13 21:47:04 2002 UTC revision 1.4 by joko, Thu Dec 19 01:06:27 2002 UTC
# Line 2  Line 2 
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  ##  ##
# Line 104  sub isEmpty { Line 107  sub isEmpty {
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') {
# Line 143  sub isEmpty { Line 148  sub isEmpty {
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  }  }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed