}
sub role_application_steps {
- qw(_install_methods _install_modifiers _check_requires _copy_applied_list);
+ qw(_install_methods _check_requires _install_modifiers _copy_applied_list);
}
sub apply_single_role_to_package {
is(ref($object), $combined, 'Object reblessed into correct class');
}
+{
+ package Five; use Role::Tiny;
+ requires 'bar';
+ around bar => sub { my $orig = shift; $orig->(@_) };
+}
+{
+ is eval {
+ package WithFive;
+ use Role::Tiny::With;
+ use base 'Base';
+ with 'Five';
+ }, undef,
+ "composing an around modifier fails when method doesn't exist";
+ like $@, qr/Can't apply Five to WithFive - missing bar/,
+ ' ... with correct error message';
+}
+
done_testing;