that come from recently composed roles. It makes
sense, people are using it, and so why not just
officially support it.
+ - fixing the 'extends' keyword so that it will not
+ trigger Ovid's bug (http://use.perl.org/~Ovid/journal/35763)
+
+ * Moose::Util
+ - fixing the 'apply_all_roles' keyword so that it will not
+ trigger Ovid's bug (http://use.perl.org/~Ovid/journal/35763)
* t/
- making test for using '+name' on attributes consumed
my $class = $CALLER;
return subname 'Moose::extends' => sub (@) {
confess "Must derive at least one class" unless @_;
- Class::MOP::load_class($_) for @_;
+
+ my @supers = @_;
+ foreach my $super (@supers) {
+ Class::MOP::load_class($super);
+ }
# this checks the metaclass to make sure
# it is correct, sometimes it can get out
# of sync when the classes are being built
- my $meta = $class->meta->_fix_metaclass_incompatability(@_);
- $meta->superclasses(@_);
+ my $meta = $class->meta->_fix_metaclass_incompatability(@supers);
+ $meta->superclasses(@supers);
};
},
with => sub {
Using this API generally violates attribute encapsulation and is not
reccomended, instead look at L<Class::MOP::Attribute/get_value>,
L<Class::MOP::Attribute/set_value>, etc, as well as L<Moose::Meta::Attribute>
-for the reccomended way to fiddle with attribute values in a generic way,
-independant of how/whether accessors have been defined. Accessors can be found
+for the recommended way to fiddle with attribute values in a generic way,
+independent of how/whether accessors have been defined. Accessors can be found
using L<Class::MOP::Class/get_attribute>.
See the L<Class::MOP::Instance> docs for details on the instance protocol.
use Carp 'confess';
use Class::MOP ();
-our $VERSION = '0.03';
+our $VERSION = '0.04';
our $AUTHORITY = 'cpan:STEVAN';
my @exports = qw[
my $meta = (blessed $applicant ? $applicant : find_meta($applicant));
- Class::MOP::load_class($_->[0]) for @$roles;
+ foreach my $role_spec (@$roles) {
+ Class::MOP::load_class($role_spec->[0]);
+ }
($_->[0]->can('meta') && $_->[0]->meta->isa('Moose::Meta::Role'))
|| confess "You can only consume roles, " . $_->[0] . " is not a Moose role"