/[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.4 by joko, Thu Dec 19 01:06:27 2002 UTC revision 1.8 by jonen, Thu Oct 7 14:06:46 2004 UTC
# Line 2  Line 2 
2  ##    $Id$  ##    $Id$
3  ##    --------------------------------------------------------------------------------  ##    --------------------------------------------------------------------------------
4  ##    $Log$  ##    $Log$
5    ##    Revision 1.8  2004/10/07 14:06:46  jonen
6    ##    minor changes, comment-out debug dumper
7    ##
8    ##    Revision 1.7  2004/07/07 03:13:43  joko
9    ##    minor fix for "sub isEmpty"
10    ##
11    ##    Revision 1.6  2004/05/12 13:53:19  jonen
12    ##    + bugfix related to declaration of arrays,
13    ##        solved error: 'Bizarre copy of ARRAY in aassign at...'
14    ##
15    ##    Revision 1.5  2003/03/27 15:17:05  joko
16    ##    namespace fixes for Data::Mungle::*
17    ##
18  ##    Revision 1.4  2002/12/19 01:06:27  joko  ##    Revision 1.4  2002/12/19 01:06:27  joko
19  ##    + fixed isEmpty with ARRAYs  ##    + fixed isEmpty with ARRAYs
20  ##  ##
# Line 17  Line 30 
30  ##    --------------------------------------------------------------------------------  ##    --------------------------------------------------------------------------------
31    
32    
33  package Data::Compare::Struct;  package Data::Mungle::Compare::Struct;
34    
35  use strict;  use strict;
36  use warnings;  use warnings;
# Line 38  sub getRelations { Line 51  sub getRelations {
51    my @a = @{$a_ref};    my @a = @{$a_ref};
52    my @b = @{$b_ref};    my @b = @{$b_ref};
53    
54    my @isect = my @diff = my @union = ();    # BUGFIX 2004-05-12: following declaration of arrays occures an strange perl error:
55      # 'Bizarre copy of ARRAY in aassign at ..<PATH_TO>/<THIS_FILE> line <NEXT LINE>'
56      # (at PERL 5.8.4, Debian/unstable/experimental)
57      #
58      #my @isect = my @diff = my @union = ();
59      #
60      # so use normal declaration instead!!
61      my @isect = ();
62      my @diff = ();
63      my @union = ();
64    
65    my $e;    my $e;
66    my %count;    my %count;
67        
# Line 76  sub isEmpty { Line 99  sub isEmpty {
99    
100    #print "isEmpty is parsing variable ( ref $ref reftype $reftype )", "\n";    #print "isEmpty is parsing variable ( ref $ref reftype $reftype )", "\n";
101        
102  #print Dumper($var);  #print Dumper($ref);
103        
104    my $found;    my $found;
105    
# Line 139  sub isEmpty { Line 162  sub isEmpty {
162      return $empty;      return $empty;
163      #return 0;      #return 0;
164        
165    } else {    # check for empty string
166      } elsif (defined $var) {
167      $found = 1;      $found = 1;
168      return 0 if defined $var;      return 0 if $var ne '';
169    }    }
170        
171    if (!$found) {    if (!$found) {
172      print "isEmpty could not parse variable ( ref $ref reftype $reftype )", "\n";      #print "isEmpty could not parse variable ( ref $ref reftype $reftype )", "\n";
173    }    }
174    
175    #print "EMPTY!!!", "\n";    #print "EMPTY!!!", "\n";

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

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