Commit | Line | Data |
badbc528 |
1 | |
2 | |
3 | package MyExporter; |
4 | use Moose::Exporter; |
5 | use Test::More; |
6 | |
7 | Moose::Exporter->setup_import_methods( |
3b400403 |
8 | with_meta => [qw(with_prototype)], |
9 | as_is => [qw(as_is_prototype)], |
badbc528 |
10 | ); |
11 | |
12 | sub with_prototype (&) { |
13 | my ($class, $code) = @_; |
14 | isa_ok($code, 'CODE', 'with_prototype received a coderef'); |
15 | $code->(); |
16 | } |
17 | |
18 | sub as_is_prototype (&) { |
19 | my ($code) = @_; |
20 | isa_ok($code, 'CODE', 'as_is_prototype received a coderef'); |
21 | $code->(); |
22 | } |
23 | |
3b400403 |
24 | 1; |