X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator%2FSchema%2FGraph%2FEdge.pm;h=cece2fadc3732b21b4ae46120af8ee038ef276bf;hb=11ad2df91bcc0674faa8fb5b6bab52c9e4a73762;hp=3357c38a5ba49cd8006717a55f3d3beeb402fab5;hpb=35349e0f5e369db6db13b6eb3d80879e7e2a6536;p=dbsrgits%2FSQL-Translator.git diff --git a/lib/SQL/Translator/Schema/Graph/Edge.pm b/lib/SQL/Translator/Schema/Graph/Edge.pm index 3357c38..cece2fa 100644 --- a/lib/SQL/Translator/Schema/Graph/Edge.pm +++ b/lib/SQL/Translator/Schema/Graph/Edge.pm @@ -2,32 +2,31 @@ 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; + my $self = shift; + +#warn "self thisfield: ".$self->thisfield->name; +#warn "self thatfield: ".$self->thatfield->name; - 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;