11 with qw/DoesNegated DoesTranspose/;
13 has x => ( isa => 'Int', is => 'rw' );
14 has y => ( isa => 'Int', is => 'rw' );
16 sub inspect { [$_[0]->x, $_[0]->y] }
27 $self->new( x => -$self->x, y => -$self->y );
34 package DoesTranspose;
39 $self->new( x => $self->y, y => $self->x );
45 my $p = Point->new( x => 4, y => 3 );
47 DoesTranspose->meta->apply( $p, alias => { transpose => 'negated' } );
49 is_deeply($p->negated->inspect, [3, 4]);
50 is_deeply($p->transpose->inspect, [3, 4]);