/[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.5 by joko, Thu Mar 27 15:17:05 2003 UTC
# Line 2  Line 2 
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  ##  ##
# Line 14  Line 20 
20  ##    --------------------------------------------------------------------------------  ##    --------------------------------------------------------------------------------
21    
22    
23  package Data::Compare::Struct;  package Data::Mungle::Compare::Struct;
24    
25  use strict;  use strict;
26  use warnings;  use warnings;
# Line 104  sub isEmpty { Line 110  sub isEmpty {
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') {
# Line 143  sub isEmpty { Line 151  sub isEmpty {
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  }  }

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

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