| 1 | package Graphics::Color::Equal; | ||
| 2 | 8 | $Graphics::Color::Equal::VERSION = '0.30'; | |
| 3 | 8 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | # ABSTRACT: Moose equality role | ||
| 6 | |||
| 7 | 8 | requires 'equal_to'; | |
| 8 | |||
| 9 | |||
| 10 | sub not_equal_to { | ||
| 11 | 5 | ▶ | my ($self, $other) = @_; |
|
Subroutine
not_equal_to: called CC=1 SCAR=0.0
Pod
documented
| |||
| 12 | 5 | not $self->equal_to($other); | |
| 13 | } | ||
| 14 | |||
| 15 | 8 | ▶ | no Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | 8 | 1; | |
| 17 | |||
| 18 | __END__ | ||
| 19 | |||
| 20 | =pod | ||
| 21 | |||
| 22 | =head1 NAME | ||
| 23 | |||
| 24 | Graphics::Color::Equal - Moose equality role | ||
| 25 | |||
| 26 | =head1 VERSION | ||
| 27 | |||
| 28 | version 0.30 | ||
| 29 | |||
| 30 | =head1 SYNOPSIS | ||
| 31 | |||
| 32 | package Graphics::Color::Foo; | ||
| 33 | use Moose; | ||
| 34 | |||
| 35 | with 'Graphics::Color::Equal'; | ||
| 36 | |||
| 37 | sub equal_to { | ||
| 38 | my ($self, $other) = @_; | ||
| 39 | |||
| 40 | # compare and return! | ||
| 41 | } | ||
| 42 | |||
| 43 | =head1 DESCRIPTION | ||
| 44 | |||
| 45 | Graphics::Color::Equal is a Moose role for equality. | ||
| 46 | |||
| 47 | =head1 METHODS | ||
| 48 | |||
| 49 | =head2 equal_to | ||
| 50 | |||
| 51 | Implement this. | ||
| 52 | |||
| 53 | =head2 not_equal_to | ||
| 54 | |||
| 55 | Provided you implement C<equal_to>, this will be implemented for you! | ||
| 56 | |||
| 57 | =head1 AUTHOR | ||
| 58 | |||
| 59 | Cory G Watson <gphat@cpan.org> | ||
| 60 | |||
| 61 | =head1 COPYRIGHT AND LICENSE | ||
| 62 | |||
| 63 | This software is copyright (c) 2014 by Cold Hard Code, LLC. | ||
| 64 | |||
| 65 | This is free software; you can redistribute it and/or modify it under | ||
| 66 | the same terms as the Perl 5 programming language system itself. | ||
| 67 | |||
| 68 | =cut | ||