package SQL::Translator::Schema::Constraint;
# ----------------------------------------------------------------------
-# $Id: Constraint.pm,v 1.5 2003-06-06 22:35:16 kycl4rk Exp $
+# $Id: Constraint.pm,v 1.6 2003-06-18 23:14:00 kycl4rk Exp $
# ----------------------------------------------------------------------
# Copyright (C) 2003 Ken Y. Clark <kclark@cpan.org>
#
use base 'Class::Base';
use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT);
-$VERSION = 1.00;
+$VERSION = (qw$Revision: 1.6 $)[-1];
my %VALID_CONSTRAINT_TYPE = (
PRIMARY_KEY, 1,
package SQL::Translator::Schema::Field;
# ----------------------------------------------------------------------
-# $Id: Field.pm,v 1.9 2003-06-09 04:11:57 kycl4rk Exp $
+# $Id: Field.pm,v 1.10 2003-06-18 23:14:00 kycl4rk Exp $
# ----------------------------------------------------------------------
# Copyright (C) 2003 Ken Y. Clark <kclark@cpan.org>
#
use base 'Class::Base';
use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT);
-$VERSION = 1.00;
+$VERSION = (qw$Revision: 1.10 $)[-1];
# ----------------------------------------------------------------------
sub init {
for my $arg ( @_ ) {
$arg = $arg->[0] if ref $arg;
- push @{ $self->{'comments'} }, $arg;
+ push @{ $self->{'comments'} }, $arg if $arg;
}
- return wantarray
- ? @{ $self->{'comments'} || [] }
- : join( "\n", @{ $self->{'comments'} || [] } );
+ if ( @{ $self->{'comments'} || [] } ) {
+ return wantarray
+ ? @{ $self->{'comments'} || [] }
+ : join( "\n", @{ $self->{'comments'} || [] } );
+ }
+ else {
+ return wantarray ? () : '';
+ }
}
package SQL::Translator::Schema::Index;
# ----------------------------------------------------------------------
-# $Id: Index.pm,v 1.5 2003-06-06 22:34:46 kycl4rk Exp $
+# $Id: Index.pm,v 1.6 2003-06-18 23:14:00 kycl4rk Exp $
# ----------------------------------------------------------------------
# Copyright (C) 2003 Ken Y. Clark <kclark@cpan.org>
#
use base 'Class::Base';
use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT);
-$VERSION = 1.00;
+$VERSION = (qw$Revision: 1.6 $)[-1];
my %VALID_INDEX_TYPE = (
UNIQUE, 1,
package SQL::Translator::Schema::Table;
# ----------------------------------------------------------------------
-# $Id: Table.pm,v 1.8 2003-06-09 02:10:10 kycl4rk Exp $
+# $Id: Table.pm,v 1.9 2003-06-18 23:14:00 kycl4rk Exp $
# ----------------------------------------------------------------------
# Copyright (C) 2003 Ken Y. Clark <kclark@cpan.org>
#
use base 'Class::Base';
use vars qw( $VERSION $FIELD_ORDER );
-$VERSION = 1.00;
+$VERSION = (qw$Revision: 1.9 $)[-1];
# ----------------------------------------------------------------------
sub init {
package SQL::Translator::Schema::View;
# ----------------------------------------------------------------------
-# $Id: View.pm,v 1.2 2003-05-09 17:12:15 kycl4rk Exp $
+# $Id: View.pm,v 1.3 2003-06-18 23:14:00 kycl4rk Exp $
# ----------------------------------------------------------------------
# Copyright (C) 2003 Ken Y. Clark <kclark@cpan.org>
#
use base 'Class::Base';
use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT);
-$VERSION = 1.00;
+$VERSION = (qw$Revision: 1.3 $)[-1];
# ----------------------------------------------------------------------
sub init {