From: Ken Youens-Clark Date: Wed, 12 Aug 2009 15:18:45 +0000 (+0000) Subject: Fixed my name, fixed some use of uninitialized vars. X-Git-Tag: v0.11008~118 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c3b0b535b4007a1674807210bef09334d1b7dac1;p=dbsrgits%2FSQL-Translator.git Fixed my name, fixed some use of uninitialized vars. --- diff --git a/lib/SQL/Translator/Schema/Constants.pm b/lib/SQL/Translator/Schema/Constants.pm index f4a456d..a1aab04 100644 --- a/lib/SQL/Translator/Schema/Constants.pm +++ b/lib/SQL/Translator/Schema/Constants.pm @@ -104,6 +104,6 @@ use constant UNIQUE => 'UNIQUE'; =head1 AUTHOR -Ken Y. Clark Ekclark@cpan.orgE. +Ken Youens-Clark Ekclark@cpan.orgE. =cut diff --git a/lib/SQL/Translator/Schema/Constraint.pm b/lib/SQL/Translator/Schema/Constraint.pm index aeb871d..84f1d8c 100644 --- a/lib/SQL/Translator/Schema/Constraint.pm +++ b/lib/SQL/Translator/Schema/Constraint.pm @@ -291,9 +291,10 @@ or "partial." =cut - my $self = shift; + my ( $self, $arg ) = @_; - if ( my $arg = lc shift ) { + if ( $arg ) { + $arg = lc $arg; return $self->error("Invalid match type: $arg") unless $arg eq 'full' || $arg eq 'partial'; $self->{'match_type'} = $arg; @@ -509,9 +510,10 @@ Get or set the constraint's type. =cut - my $self = shift; + my ( $self, $type ) = @_; - if ( my $type = uc (shift || '') ) { + if ( $type ) { + $type = uc $type; $type =~ s/_/ /g; return $self->error("Invalid constraint type: $type") unless $VALID_CONSTRAINT_TYPE{ $type }; @@ -601,6 +603,6 @@ sub DESTROY { =head1 AUTHOR -Ken Y. Clark Ekclark@cpan.orgE. +Ken Youens-Clark Ekclark@cpan.orgE. =cut diff --git a/lib/SQL/Translator/Schema/Field.pm b/lib/SQL/Translator/Schema/Field.pm index 1173a88..3249d95 100644 --- a/lib/SQL/Translator/Schema/Field.pm +++ b/lib/SQL/Translator/Schema/Field.pm @@ -689,6 +689,6 @@ sub DESTROY { =head1 AUTHOR -Ken Y. Clark Ekclark@cpan.orgE. +Ken Youens-Clark Ekclark@cpan.orgE. =cut diff --git a/lib/SQL/Translator/Schema/Index.pm b/lib/SQL/Translator/Schema/Index.pm index fe5fd5c..4a71063 100644 --- a/lib/SQL/Translator/Schema/Index.pm +++ b/lib/SQL/Translator/Schema/Index.pm @@ -229,9 +229,10 @@ uppercase. =cut - my $self = shift; + my ( $self, $type ) = @_; - if ( my $type = uc shift ) { + if ( $type ) { + $type = uc $type; return $self->error("Invalid index type: $type") unless $VALID_INDEX_TYPE{ $type }; $self->{'type'} = $type; @@ -302,6 +303,6 @@ sub DESTROY { =head1 AUTHOR -Ken Y. Clark Ekclark@cpan.orgE. +Ken Youens-Clark Ekclark@cpan.orgE. =cut diff --git a/lib/SQL/Translator/Schema/Object.pm b/lib/SQL/Translator/Schema/Object.pm index 4325424..c2aa333 100644 --- a/lib/SQL/Translator/Schema/Object.pm +++ b/lib/SQL/Translator/Schema/Object.pm @@ -231,6 +231,7 @@ sub _compare_objects { =head1 AUTHOR -Ken Y. Clark Ekclark@cpan.orgE, Mark Addison Emark.addison@itn.co.ukE +Ken Youens-Clark Ekclark@cpan.orgE, +Mark Addison Emark.addison@itn.co.ukE. =cut diff --git a/lib/SQL/Translator/Schema/Procedure.pm b/lib/SQL/Translator/Schema/Procedure.pm index d6d1dee..c7d549e 100644 --- a/lib/SQL/Translator/Schema/Procedure.pm +++ b/lib/SQL/Translator/Schema/Procedure.pm @@ -292,7 +292,7 @@ sub DESTROY { =head1 AUTHORS -Ken Y. Clark Ekclark@cshl.orgE, +Ken Youens-Clark Ekclark@cshl.orgE, Paul Harrington EPaul-Harrington@deshaw.comE. =cut diff --git a/lib/SQL/Translator/Schema/Table.pm b/lib/SQL/Translator/Schema/Table.pm index 01fb965..3e02c43 100644 --- a/lib/SQL/Translator/Schema/Table.pm +++ b/lib/SQL/Translator/Schema/Table.pm @@ -1122,7 +1122,7 @@ sub DESTROY { =head1 AUTHORS -Ken Y. Clark Ekclark@cpan.orgE, +Ken Youens-Clark Ekclark@cpan.orgE, Allen Day Eallenday@ucla.eduE. =cut diff --git a/lib/SQL/Translator/Schema/View.pm b/lib/SQL/Translator/Schema/View.pm index e21fcd2..637ee3d 100644 --- a/lib/SQL/Translator/Schema/View.pm +++ b/lib/SQL/Translator/Schema/View.pm @@ -262,6 +262,6 @@ sub DESTROY { =head1 AUTHOR -Ken Y. Clark Ekclark@cpan.orgE. +Ken Youens-Clark Ekclark@cpan.orgE. =cut