Skip Menu |

This queue is for tickets about the SQL-Translator CPAN distribution.

Report information
The Basics
Id: 47897
Status: resolved
Worked: 5 min
Priority: 0/
Queue: SQL-Translator

People
Owner: kclark [...] cpan.org
Requestors: schwigon [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.09007
Fixed in: (no value)



Subject: [PATCH] Fix
Hi! With SQLT 0.09007 and Perl 5.11.0 (GitLive-blead-1320-g8bc7f08*) I get a lot of warnings like this: Use of uninitialized value within @_ in uc at [...]/SQL/Translator/Schema/Constraint.pm line 514. They could be fixed canonically with if (@_ and ...) as seen in attached patches. Thanks and kind regards, Steffen -- Steffen Schwigon <ss5@renormalist.net> Dresden Perl Mongers <http://dresden-pm.org/> Deutscher Perl-Workshop <http://www.perl-workshop.de/>
Subject: index.diff
--- lib/SQL/Translator/Schema/Index.pm 2009-04-27 17:36:01.000000000 +0200 +++ /usr/local/lib/perl5/site_perl/5.11.0/SQL/Translator/Schema/Index.pm 2009-07-15 10:16:47.000000000 +0200 @@ -231,7 +231,7 @@ my $self = shift; - if ( my $type = uc shift ) { + if ( @_ and my $type = uc shift ) { return $self->error("Invalid index type: $type") unless $VALID_INDEX_TYPE{ $type }; $self->{'type'} = $type;
Subject: constraint.diff
--- lib/SQL/Translator/Schema/Constraint.pm 2009-04-27 17:36:01.000000000 +0200 +++ /usr/local/lib/perl5/site_perl/5.11.0/SQL/Translator/Schema/Constraint.pm 2009-07-15 10:16:16.000000000 +0200 @@ -293,7 +293,7 @@ my $self = shift; - if ( my $arg = lc shift ) { + if ( @_ and my $arg = lc shift ) { return $self->error("Invalid match type: $arg") unless $arg eq 'full' || $arg eq 'partial'; $self->{'match_type'} = $arg; @@ -511,7 +511,7 @@ my $self = shift; - if ( my $type = uc shift ) { + if ( @_ and my $type = uc shift ) { $type =~ s/_/ /g; return $self->error("Invalid constraint type: $type") unless $VALID_CONSTRAINT_TYPE{ $type };
Fixed in r1604.