From: Mark Addison Date: Wed, 25 May 2005 12:38:03 +0000 (+0000) Subject: Applied Chris Hilton patch to remove 'Use of uninitialized value in addition' warnings X-Git-Tag: v0.11008~559 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c6a9363c2ea4aec7053dcbc5a1232974fce1b430;p=dbsrgits%2FSQL-Translator.git Applied Chris Hilton patch to remove 'Use of uninitialized value in addition' warnings --- diff --git a/lib/SQL/Translator/Schema/Graph/Node.pm b/lib/SQL/Translator/Schema/Graph/Node.pm index 26c706d..fc901b2 100644 --- a/lib/SQL/Translator/Schema/Graph/Node.pm +++ b/lib/SQL/Translator/Schema/Graph/Node.pm @@ -20,7 +20,7 @@ sub many { if(scalar(@_) == 1){ my $k = shift; - return $self->{_many}{$k}; + return $self->{_many}{$k} || 0; } elsif(@_) { my %arg = @_; @@ -42,7 +42,7 @@ sub via { if(scalar(@_) == 1){ my $k = shift; - return $self->{_via}{$k}; + return $self->{_via}{$k} || 0; } elsif(@_) { my %arg = @_; @@ -64,7 +64,7 @@ sub has { if(scalar(@_) == 1){ my $k = shift; - return $self->{_has}{$k}; + return $self->{_has}{$k} || 0; } elsif(@_) { my %arg = @_; @@ -86,7 +86,7 @@ sub edgecount { if(scalar(@_) == 1){ my $k = shift; - return $self->{_edgecount}{$k}; + return $self->{_edgecount}{$k} || 0; } elsif(@_) { my %arg = @_;