objects and made them all use it.
package SQL::Translator::Schema;
# ----------------------------------------------------------------------
-# $Id: Schema.pm,v 1.18 2004-10-15 03:52:50 allenday Exp $
+# $Id: Schema.pm,v 1.19 2004-11-04 16:29:56 grommit Exp $
# ----------------------------------------------------------------------
# Copyright (C) 2002-4 SQLFairy Authors
#
=cut
use strict;
-use Class::Base;
use SQL::Translator::Schema::Constants;
use SQL::Translator::Schema::Procedure;
use SQL::Translator::Schema::Table;
use SQL::Translator::Schema::Graph;
use SQL::Translator::Utils 'parse_list_arg';
-use base 'Class::Base';
+use base 'SQL::Translator::Schema::Object';
use vars qw[ $VERSION $TABLE_ORDER $VIEW_ORDER $TRIGGER_ORDER $PROC_ORDER ];
-$VERSION = sprintf "%d.%02d", q$Revision: 1.18 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.19 $ =~ /(\d+)\.(\d+)/;
# ----------------------------------------------------------------------
sub init {
package SQL::Translator::Schema::Constraint;
# ----------------------------------------------------------------------
-# $Id: Constraint.pm,v 1.13 2004-03-29 11:18:12 grommit Exp $
+# $Id: Constraint.pm,v 1.14 2004-11-04 16:29:56 grommit Exp $
# ----------------------------------------------------------------------
# Copyright (C) 2002-4 SQLFairy Authors
#
=cut
use strict;
-use Class::Base;
use SQL::Translator::Schema::Constants;
use SQL::Translator::Utils 'parse_list_arg';
-use base 'Class::Base';
+use base 'SQL::Translator::Schema::Object';
+
use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT);
-$VERSION = sprintf "%d.%02d", q$Revision: 1.13 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.14 $ =~ /(\d+)\.(\d+)/;
my %VALID_CONSTRAINT_TYPE = (
PRIMARY_KEY, 1,
package SQL::Translator::Schema::Field;
# ----------------------------------------------------------------------
-# $Id: Field.pm,v 1.19 2004-07-09 00:46:28 grommit Exp $
+# $Id: Field.pm,v 1.20 2004-11-04 16:29:56 grommit Exp $
# ----------------------------------------------------------------------
# Copyright (C) 2002-4 SQLFairy Authors
#
=cut
use strict;
-use Class::Base;
use SQL::Translator::Schema::Constants;
use SQL::Translator::Utils 'parse_list_arg';
-use base 'Class::Base';
+use base 'SQL::Translator::Schema::Object';
+
use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT);
-$VERSION = sprintf "%d.%02d", q$Revision: 1.19 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.20 $ =~ /(\d+)\.(\d+)/;
# Stringify to our name, being careful not to pass any args through so we don't
# accidentally set it to undef. We also have to tweak bool so the object is
package SQL::Translator::Schema::Index;
# ----------------------------------------------------------------------
-# $Id: Index.pm,v 1.8 2004-02-09 22:15:15 kycl4rk Exp $
+# $Id: Index.pm,v 1.9 2004-11-04 16:29:56 grommit Exp $
# ----------------------------------------------------------------------
# Copyright (C) 2002-4 SQLFairy Authors
#
=cut
use strict;
-use Class::Base;
use SQL::Translator::Schema::Constants;
use SQL::Translator::Utils 'parse_list_arg';
-use base 'Class::Base';
+use base 'SQL::Translator::Schema::Object';
+
use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT);
-$VERSION = sprintf "%d.%02d", q$Revision: 1.8 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.9 $ =~ /(\d+)\.(\d+)/;
my %VALID_INDEX_TYPE = (
UNIQUE, 1,
--- /dev/null
+package SQL::Translator::Schema::Object;
+
+# ----------------------------------------------------------------------
+# $Id: Object.pm,v 1.1 2004-11-04 16:29:56 grommit Exp $
+# ----------------------------------------------------------------------
+# Copyright (C) 2002-4 SQLFairy Authors
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; version 2.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA
+# -------------------------------------------------------------------
+
+=pod
+
+=head1 NAME
+
+SQL::Translator::Schema::Object - Base class SQL::Translator Schema objects.
+
+=head1 SYNOPSIS
+
+=head1 DESCSIPTION
+
+Doesn't currently provide any functionaliy apart from sub classing
+L<Class::Base>. Here to provide a single place to impliment global Schema
+object functionality.
+
+=cut
+
+use strict;
+use Class::Base;
+use base 'Class::Base';
+
+use vars qw[ $VERSION ];
+
+$VERSION = sprintf "%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/;
+
+
+1;
+
+# ----------------------------------------------------------------------
+
+=pod
+
+=head1 SEE ALSO
+
+=head1 TODO
+
+=head1 BUGS
+
+=head1 AUTHOR
+
+Ken Y. Clark E<lt>kclark@cpan.orgE<gt>, Mark Addison E<lt>mark.addison@itn.co.ukE<gt>
+
+=cut
package SQL::Translator::Schema::Procedure;
# ----------------------------------------------------------------------
-# $Id: Procedure.pm,v 1.2 2004-02-09 22:15:15 kycl4rk Exp $
+# $Id: Procedure.pm,v 1.3 2004-11-04 16:29:56 grommit Exp $
# ----------------------------------------------------------------------
# Copyright (C) 2002-4 SQLFairy Authors
#
=cut
use strict;
-use Class::Base;
use SQL::Translator::Utils 'parse_list_arg';
-use base 'Class::Base';
+use base 'SQL::Translator::Schema::Object';
+
use vars qw($VERSION);
-$VERSION = sprintf "%d.%02d", q$Revision: 1.2 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/;
# ----------------------------------------------------------------------
sub init {
package SQL::Translator::Schema::Table;
# ----------------------------------------------------------------------
-# $Id: Table.pm,v 1.26 2004-03-29 12:25:54 grommit Exp $
+# $Id: Table.pm,v 1.27 2004-11-04 16:29:56 grommit Exp $
# ----------------------------------------------------------------------
# Copyright (C) 2002-4 SQLFairy Authors
#
=cut
use strict;
-use Class::Base;
use SQL::Translator::Utils 'parse_list_arg';
use SQL::Translator::Schema::Constants;
use SQL::Translator::Schema::Constraint;
use SQL::Translator::Schema::Index;
use Data::Dumper;
-use base 'Class::Base';
+use base 'SQL::Translator::Schema::Object';
+
use vars qw( $VERSION $FIELD_ORDER );
-$VERSION = sprintf "%d.%02d", q$Revision: 1.26 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.27 $ =~ /(\d+)\.(\d+)/;
# Stringify to our name, being careful not to pass any args through so we don't
package SQL::Translator::Schema::Trigger;
# ----------------------------------------------------------------------
-# $Id: Trigger.pm,v 1.3 2004-02-09 22:15:15 kycl4rk Exp $
+# $Id: Trigger.pm,v 1.4 2004-11-04 16:29:56 grommit Exp $
# ----------------------------------------------------------------------
# Copyright (C) 2002-4 SQLFairy Authors
#
=cut
use strict;
-use Class::Base;
use SQL::Translator::Utils 'parse_list_arg';
-use base 'Class::Base';
+use base 'SQL::Translator::Schema::Object';
+
use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT);
-$VERSION = sprintf "%d.%02d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/;
# ----------------------------------------------------------------------
sub init {
package SQL::Translator::Schema::View;
# ----------------------------------------------------------------------
-# $Id: View.pm,v 1.7 2004-02-09 22:15:15 kycl4rk Exp $
+# $Id: View.pm,v 1.8 2004-11-04 16:29:56 grommit Exp $
# ----------------------------------------------------------------------
# Copyright (C) 2002-4 SQLFairy Authors
#
=cut
use strict;
-use Class::Base;
use SQL::Translator::Utils 'parse_list_arg';
-use base 'Class::Base';
+use base 'SQL::Translator::Schema::Object';
+
use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT);
-$VERSION = sprintf "%d.%02d", q$Revision: 1.7 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.8 $ =~ /(\d+)\.(\d+)/;
# ----------------------------------------------------------------------
sub init {