X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator%2FSchema%2FGraph%2FEdge.pm;h=3357c38a5ba49cd8006717a55f3d3beeb402fab5;hb=ba506e52c480afe33dfec6b38a12759fad1e7fa2;hp=6915e71262f2cb8590706ba6a9ab5c5a4ccede59;hpb=0caaf4c3fb70de1a3dcc6e8e70c06c53b56c007c;p=dbsrgits%2FSQL-Translator.git diff --git a/lib/SQL/Translator/Schema/Graph/Edge.pm b/lib/SQL/Translator/Schema/Graph/Edge.pm index 6915e71..3357c38 100644 --- a/lib/SQL/Translator/Schema/Graph/Edge.pm +++ b/lib/SQL/Translator/Schema/Graph/Edge.pm @@ -2,27 +2,32 @@ package SQL::Translator::Schema::Graph::Edge; use strict; +use vars qw[ $VERSION ]; +$VERSION = '1.60'; + use Class::MakeMethods::Template::Hash ( - new => ['new'], - scalar => [ qw( type ) ], - array => [ qw( traversals ) ], - object => [ - 'thisfield' => {class => 'SQL::Translator::Schema::Field'}, #FIXME - 'thatfield' => {class => 'SQL::Translator::Schema::Field'}, #FIXME - 'thisnode' => {class => 'SQL::Translator::Schema::Graph::Node'}, - 'thatnode' => {class => 'SQL::Translator::Schema::Graph::Node'}, + new => ['new'], + scalar => [qw( type )], + array => [qw( traversals )], + object => [ + 'thisfield' => { class => 'SQL::Translator::Schema::Field' }, #FIXME + 'thatfield' => { class => 'SQL::Translator::Schema::Field' }, #FIXME + 'thisnode' => { class => 'SQL::Translator::Schema::Graph::Node' }, + 'thatnode' => { class => 'SQL::Translator::Schema::Graph::Node' }, - ], + ], ); sub flip { - my $self = shift; - return SQL::Translator::Schema::Graph::Edge->new( thisfield => $self->thatfield, - thatfield => $self->thisfield, - thisnode => $self->thatnode, - thatnode => $self->thisnode, - type => $self->type eq 'import' ? 'export' : 'import' - ); + my $self = shift; + + return SQL::Translator::Schema::Graph::Edge->new( + thisfield => $self->thatfield, + thatfield => $self->thisfield, + thisnode => $self->thatnode, + thatnode => $self->thisnode, + type => $self->type eq 'import' ? 'export' : 'import' + ); } 1;