-
package Moose::Meta::Role;
use strict;
use warnings;
use metaclass;
+use Class::Load qw(load_class);
use Scalar::Util 'blessed';
use Carp 'confess';
use Devel::GlobalDestruction 'in_global_destruction';
# NOTE:
# since roles are lazy, we hold all the attributes
-# of the individual role in 'statis' until which
+# of the individual role in 'stasis' until which
# time when it is applied to a class. This means
# keeping a lot of things in hash maps, so we are
# using a little of that meta-programmin' magic
$application_class = $self->application_to_instance_class;
}
- Class::MOP::load_class($application_class);
+ load_class($application_class);
if ( exists $args{'-excludes'} ) {
# I wish we had coercion here :)
=back
+=head2 Overload introspection and creation
+
+The methods for dealing with a role's overloads are all identical in API
+and behavior to the same methods in L<Class::MOP::Class>. Note that these are
+not particularly useful (yet), because overloads do not participate in role
+composition.
+
+=over 4
+
+=item B<< $metarole->is_overloaded >>
+
+=item B<< $metarole->get_overloaded_operator($op) >>
+
+=item B<< $metarole->has_overloaded_operator($op) >>
+
+=item B<< $metarole->get_overload_list >>
+
+=item B<< $metarole->get_all_overloaded_operators >>
+
+=item B<< $metarole->add_overloaded_operator($op, $impl) >>
+
+=item B<< $metarole->remove_overloaded_operator($op) >>
+
+=back
+
=head2 Required methods
=over 4