10 use Sub::Exporter -setup => {
16 $INC{'ExportsFoo.pm'} = 1;
36 ::exception { with 'Foo' },
37 qr/^\Q'Foo' requires the method 'foo' to be implemented by 'Class'. If you imported functions intending to use them as methods, you need to explicitly mark them as such, via Class->meta->add_method(foo => \&foo)/,
38 "imported 'method' isn't seen"
40 Class->meta->add_method(foo => \&foo);
42 ::exception { with 'Foo' },
48 ::exception { with 'Bar' },
49 qr/^\Q'Bar' requires the method 'bar' to be implemented by 'Class' at/,
50 "requirement isn't imported, so don't give the extra info in the error"
54 does_ok('Class', 'Foo');