package Foo;
use Moose;
# mark overloads as methods and wipe other non-methods
use MooseX::MarkAsMethods autoclean => 1;
# define overloads, etc as normal
package Baz;
use Moose::Role;
use MooseX::MarkAsMethods autoclean => 1;
# overloads defined in a role will "just work" when the role is
# composed into a class
use constant foo => 'bar';
# additional methods generated outside Class::MOP/Moose can be marked, too
__PACKAGE__->meta->mark_as_method('foo');
package Bar;
use Moose;
# order is important!
use namespace::autoclean;
use MooseX::MarkAsMethods;
# ...
Created
April 4, 2011 02:49
-
-
Save rsrchboy/901078 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment