Commit | Line | Data |
---|---|---|
6b353e96 | 1 | package ORTestObjects; |
2 | ||
3 | use Moo; | |
4 | ||
5 | has name => (is => 'rwp', default => sub { 'Fred' }); | |
6 | ||
7 | sub same_name { | |
8 | my ($self, $other) = @_; | |
9 | ||
10 | return $self->name eq $other->name; | |
11 | } | |
12 | ||
13 | sub give_back { | |
14 | my ($self) = @_; | |
15 | ||
16 | return $self; | |
17 | } | |
18 | ||
19 | sub takes_object { | |
20 | my ($self, $object) = @_; | |
21 | ||
6b353e96 | 22 | if($object->isa('ORTestObjects')) { |
23 | return 1; | |
24 | } | |
25 | ||
26 | return 0; | |
27 | } | |
28 | ||
29 | 1; |