Geometry::Primitive::Equal - Equality Role


Geometry-Primitive documentation Contained in the Geometry-Primitive distribution.

Index


Code Index:

NAME

Top

Geometry::Primitive::Equal - Equality Role

DESCRIPTION

Top

Geometry::Primitive::Equal is a Moose role for equality.

SYNOPSIS

Top

  with 'Geometry::Primitive::Equal';

  sub equal_to {
      my ($self, $other) = @_;

      # compare and return!
  }

METHODS

Top

equal_to

Implement this.

not_equal_to

Provided you implement equal_to, this will be implemented for you!

AUTHOR

Top

Cory Watson <gphat@cpan.org>

COPYRIGHT & LICENSE

Top


Geometry-Primitive documentation Contained in the Geometry-Primitive distribution.

package Geometry::Primitive::Equal;
use Moose::Role;

requires 'equal_to';

sub not_equal_to {
    my ($self, $other) = @_;
    not $self->equal_to($other);
}

no Moose;
1;
__END__