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=cece2fadc3732b21b4ae46120af8ee038ef276bf;hpb=65157eda722d2e485d50ec4bca99e2e4504e73e9;p=dbsrgits%2FSQL-Translator.git diff --git a/lib/SQL/Translator/Schema/Graph/Edge.pm b/lib/SQL/Translator/Schema/Graph/Edge.pm index cece2fa..3357c38 100644 --- a/lib/SQL/Translator/Schema/Graph/Edge.pm +++ b/lib/SQL/Translator/Schema/Graph/Edge.pm @@ -2,31 +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; - -#warn "self thisfield: ".$self->thisfield->name; -#warn "self thatfield: ".$self->thatfield->name; + 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' - ); + 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;