1 package Text::Tradition::Collation::Relationship;
4 use Moose::Util::TypeConstraints;
5 ## CAREFUL in our use of Moose::Util::TypeConstraints. That 'from'
6 ## clashes with Graph::Easy::Edge 'from', so we'll need to unimport
7 ## TypeConstraints after defining the types. Or else we would have to
8 ## finally split out our types into another module.
11 extends 'Graph::Easy::Edge';
13 enum 'RelationshipType' => qw( spelling orthographic grammatical repetition lexical );
15 no Moose::Util::TypeConstraints; ## see comment above
19 isa => 'RelationshipType',
29 has 'non_correctable' => (
34 has 'non_independent' => (
44 sub FOREIGNBUILDARGS {
48 # Make the label match our 'type' attribute.
50 if( exists $args{'type'} ) {
51 push( @superclass_args, 'label', $args{'type'} );
53 return @superclass_args;
57 my( $self, $args ) = @_;
59 $self->set_attribute( 'class', 'relationship' );
64 __PACKAGE__->meta->make_immutable;