use strict;
use warnings FATAL => 'all';
-our $VERSION = '1.002002'; # 1.2.2
+our $VERSION = '1.002005'; # 1.2.5
$VERSION = eval $VERSION;
our %INFO;
delete $INFO{$to}{methods}; # reset since we're about to add methods
}
- $me->apply_role_to_package($to, $_) for @roles;
+ foreach my $role (@roles) {
+ $me->apply_single_role_to_package($to, $role);
+ }
$APPLIED_TO{$to}{join('|',@roles)} = 1;
}
sub _composite_info_for {
my ($me, @roles) = @_;
$COMPOSITE_INFO{join('|', sort @roles)} ||= do {
- _load_module($_) for @roles;
+ foreach my $role (@roles) {
+ _load_module($role);
+ }
my %methods;
foreach my $role (@roles) {
my $this_methods = $me->_concrete_methods_of($role);
map {
my $code = *{$stash->{$_}}{CODE};
# rely on the '' key we added in import for "no code here"
- exists $not_methods->{$code||''} ? () : ($_ => $code)
+ ( ! $code or exists $not_methods->{$code||''} ) ? () : ($_ => $code)
} grep !ref($stash->{$_}), keys %$stash
};
}
}
}
+my $vcheck_error;
+
sub _install_single_modifier {
my ($me, @args) = @_;
+ defined($vcheck_error) or $vcheck_error = do {
+ local $@;
+ eval { Class::Method::Modifiers->VERSION(1.05); 1 }
+ ? 0
+ : $@
+ };
+ $vcheck_error and die $vcheck_error;
Class::Method::Modifiers::install_modifier(@args);
}
1;
+=encoding utf-8
+
=head1 NAME
Role::Tiny - Roles. Like a nouvelle cuisine portion size slice of Moose.