From: Justin Hunter Date: Tue, 25 Aug 2009 03:14:58 +0000 (-0700) Subject: move to MooseX::Declare extends style X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ebf2721d0450ee3a6c73b89e5d7c00d8af3d1105;p=dbsrgits%2FSQL-Translator-2.0-ish.git move to MooseX::Declare extends style --- diff --git a/lib/SQL/Translator/Object/Column.pm b/lib/SQL/Translator/Object/Column.pm index 567c020..dea7791 100644 --- a/lib/SQL/Translator/Object/Column.pm +++ b/lib/SQL/Translator/Object/Column.pm @@ -1,9 +1,8 @@ use MooseX::Declare; -class SQL::Translator::Object::Column { +class SQL::Translator::Object::Column extends SQL::Translator::Object { use MooseX::Types::Moose qw(ArrayRef Bool HashRef Int Maybe Str); use MooseX::MultiMethods; use SQL::Translator::Types qw(ColumnSize Constraint Table Trigger); - extends 'SQL::Translator::Object'; has 'table' => ( is => 'rw', diff --git a/lib/SQL/Translator/Object/Constraint.pm b/lib/SQL/Translator/Object/Constraint.pm index 66bffc9..b1db92c 100644 --- a/lib/SQL/Translator/Object/Constraint.pm +++ b/lib/SQL/Translator/Object/Constraint.pm @@ -1,9 +1,8 @@ use MooseX::Declare; -class SQL::Translator::Object::Constraint { +class SQL::Translator::Object::Constraint extends SQL::Translator::Object { use MooseX::Types::Moose qw(ArrayRef Bool HashRef Maybe Str Undef); use MooseX::AttributeHelpers; use SQL::Translator::Types qw(Column Table); - extends 'SQL::Translator::Object'; has 'table' => ( is => 'rw', diff --git a/lib/SQL/Translator/Object/ForeignKey.pm b/lib/SQL/Translator/Object/ForeignKey.pm index f9d2327..9bef40e 100644 --- a/lib/SQL/Translator/Object/ForeignKey.pm +++ b/lib/SQL/Translator/Object/ForeignKey.pm @@ -1,7 +1,6 @@ use MooseX::Declare; -class SQL::Translator::Object::ForeignKey { +class SQL::Translator::Object::ForeignKey extends SQL::Translator::Object::Constraint { use MooseX::Types::Moose qw(ArrayRef Maybe Undef Str); - extends 'SQL::Translator::Object::Constraint'; has '+type' => ( default => 'FOREIGN KEY', diff --git a/lib/SQL/Translator/Object/Index.pm b/lib/SQL/Translator/Object/Index.pm index e6b787d..4037bb3 100644 --- a/lib/SQL/Translator/Object/Index.pm +++ b/lib/SQL/Translator/Object/Index.pm @@ -1,9 +1,8 @@ use MooseX::Declare; -class SQL::Translator::Object::Index { +class SQL::Translator::Object::Index extends SQL::Translator::Object { use MooseX::Types::Moose qw(ArrayRef HashRef Str); use MooseX::AttributeHelpers; use SQL::Translator::Types qw(Column Table); - extends 'SQL::Translator::Object'; has 'table' => ( is => 'rw', diff --git a/lib/SQL/Translator/Object/PrimaryKey.pm b/lib/SQL/Translator/Object/PrimaryKey.pm index 240d71a..aa263fe 100644 --- a/lib/SQL/Translator/Object/PrimaryKey.pm +++ b/lib/SQL/Translator/Object/PrimaryKey.pm @@ -1,7 +1,5 @@ use MooseX::Declare; -class SQL::Translator::Object::PrimaryKey { - extends qw(SQL::Translator::Object::Index SQL::Translator::Object::Constraint); - +class SQL::Translator::Object::PrimaryKey extends (SQL::Translator::Object::Index, SQL::Translator::Object::Constraint) { has '+type' => ( default => 'PRIMARY KEY', ); diff --git a/lib/SQL/Translator/Object/Procedure.pm b/lib/SQL/Translator/Object/Procedure.pm index d095693..8c95cd4 100644 --- a/lib/SQL/Translator/Object/Procedure.pm +++ b/lib/SQL/Translator/Object/Procedure.pm @@ -1,7 +1,6 @@ use MooseX::Declare; -class SQL::Translator::Object::Procedure { +class SQL::Translator::Object::Procedure extends SQL::Translator::Object { use MooseX::Types::Moose qw(ArrayRef Int Str); - extends 'SQL::Translator::Object'; has 'name' => ( is => 'rw', diff --git a/lib/SQL/Translator/Object/Schema.pm b/lib/SQL/Translator/Object/Schema.pm index b3c69ed..99d0423 100644 --- a/lib/SQL/Translator/Object/Schema.pm +++ b/lib/SQL/Translator/Object/Schema.pm @@ -1,9 +1,8 @@ use MooseX::Declare; -class SQL::Translator::Object::Schema { +class SQL::Translator::Object::Schema extends SQL::Translator::Object { use MooseX::Types::Moose qw(HashRef Maybe Str); use MooseX::AttributeHelpers; use SQL::Translator::Types qw(Procedure Table Trigger View); - extends 'SQL::Translator::Object'; has 'name' => ( is => 'rw', diff --git a/lib/SQL/Translator/Object/Sequence.pm b/lib/SQL/Translator/Object/Sequence.pm index 1b0ea39..7339a9b 100644 --- a/lib/SQL/Translator/Object/Sequence.pm +++ b/lib/SQL/Translator/Object/Sequence.pm @@ -1,8 +1,6 @@ use MooseX::Declare; -class SQL::Translator::Object::Sequence { +class SQL::Translator::Object::Sequence extends SQL::Translator::Object { use MooseX::Types::Moose qw(Str); - use SQL::Translator::Types qw(); - extends 'SQL::Translator::Object'; has 'name' => ( is => 'ro', diff --git a/lib/SQL/Translator/Object/Table.pm b/lib/SQL/Translator/Object/Table.pm index fff8c07..c50b0d1 100644 --- a/lib/SQL/Translator/Object/Table.pm +++ b/lib/SQL/Translator/Object/Table.pm @@ -1,11 +1,9 @@ use MooseX::Declare; -class SQL::Translator::Object::Table { +class SQL::Translator::Object::Table extends SQL::Translator::Object { use MooseX::Types::Moose qw(Any ArrayRef Bool HashRef Maybe Str); use MooseX::AttributeHelpers; use MooseX::MultiMethods; use SQL::Translator::Types qw(Column Constraint Index Schema Sequence); - use SQL::Translator::Object::Schema; - extends 'SQL::Translator::Object'; has 'name' => ( is => 'rw', diff --git a/lib/SQL/Translator/Object/Trigger.pm b/lib/SQL/Translator/Object/Trigger.pm index 6696e62..3439694 100644 --- a/lib/SQL/Translator/Object/Trigger.pm +++ b/lib/SQL/Translator/Object/Trigger.pm @@ -1,9 +1,8 @@ use MooseX::Declare; -class SQL::Translator::Object::Trigger { +class SQL::Translator::Object::Trigger extends SQL::Translator::Object { use MooseX::Types::Moose qw(Any ArrayRef HashRef Str); use MooseX::AttributeHelpers; use SQL::Translator::Types qw(Column); - extends 'SQL::Translator::Object'; has 'name' => ( is => 'ro', diff --git a/lib/SQL/Translator/Object/View.pm b/lib/SQL/Translator/Object/View.pm index 6c63c9d..5d15b88 100644 --- a/lib/SQL/Translator/Object/View.pm +++ b/lib/SQL/Translator/Object/View.pm @@ -1,9 +1,8 @@ use MooseX::Declare; -class SQL::Translator::Object::View { +class SQL::Translator::Object::View extends SQL::Translator::Object { use MooseX::Types::Moose qw(HashRef Str); use MooseX::AttributeHelpers; use SQL::Translator::Types qw(Column); - extends 'SQL::Translator::Object'; has 'name' => ( is => 'rw',