6 Moose::Cookbook::Recipe6 - The Moose::Role example
18 my ($self, $other) = @_;
19 !$self->equal_to($other);
32 my ($self, $other) = @_;
33 $self->compare($other) == 0;
37 my ($self, $other) = @_;
38 $self->compare($other) == 1;
42 my ($self, $other) = @_;
43 $self->compare($other) == -1;
46 sub greater_than_or_equal_to {
47 my ($self, $other) = @_;
48 $self->greater_than($other) || $self->equal_to($other);
51 sub less_than_or_equal_to {
52 my ($self, $other) = @_;
53 $self->less_than($other) || $self->equal_to($other);
63 has 'amount' => (is => 'rw', isa => 'Int', default => 0);
66 my ($self, $other) = @_;
67 $self->amount <=> $other->amount;
76 Stevan Little E<lt>stevan@iinteractive.comE<gt>
78 =head1 COPYRIGHT AND LICENSE
80 Copyright 2006 by Infinity Interactive, Inc.
82 L<http://www.iinteractive.com>
84 This library is free software; you can redistribute it and/or modify
85 it under the same terms as Perl itself.