Stevan Little > Moose-0.05 > Moose::Role

Download:
Moose-0.05.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  4
Open  13
View Bugs
Report a bug
Module Version: 0.03   Source   Latest Release: Moose-0.93

NAME ^

Moose::Role - The Moose Role

SYNOPSIS ^

  package Eq;
  use strict;
  use warnings;
  use Moose::Role;
  
  requires 'equal';
  
  sub no_equal { 
      my ($self, $other) = @_;
      !$self->equal($other);
  }
  
  # ... then in your classes
  
  package Currency;
  use strict;
  use warnings;
  use Moose;
  
  with 'Eq';
  
  sub equal {
      my ($self, $other) = @_;
      $self->as_float == $other->as_float;
  }

DESCRIPTION ^

This is currently a very early release of Perl 6 style Roles for Moose, it is still incomplete, but getting much closer. If you are interested in helping move this feature along, please come to #moose on irc.perl.org and we can talk.

CAVEATS ^

Currently, the role support has a few of caveats. They are as follows:

BUGS ^

All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.

AUTHOR ^

Stevan Little <stevan@iinteractive.com>

COPYRIGHT AND LICENSE ^

Copyright 2006 by Infinity Interactive, Inc.

http://www.iinteractive.com

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.