2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
14 with qw/DoesNegated DoesTranspose/;
16 has x => ( isa => 'Int', is => 'rw' );
17 has y => ( isa => 'Int', is => 'rw' );
19 sub inspect { [$_[0]->x, $_[0]->y] }
30 $self->new( x => -$self->x, y => -$self->y );
37 package DoesTranspose;
42 $self->new( x => $self->y, y => $self->x );
48 my $p = Point->new( x => 4, y => 3 );
50 DoesTranspose->meta->apply( $p, -alias => { transpose => 'negated' } );
52 is_deeply($p->negated->inspect, [3, 4]);
53 is_deeply($p->transpose->inspect, [3, 4]);