Commit | Line | Data |
---|---|---|
badbc528 | 1 | use lib "t/lib"; |
2 | package MyExporter::User; | |
3 | use MyExporter; | |
4 | ||
a28e50e4 | 5 | use Test::More; |
53a4d826 | 6 | use Test::Exception; |
badbc528 | 7 | |
53a4d826 | 8 | lives_and { |
badbc528 | 9 | with_prototype { |
10 | my $caller = caller(0); | |
11 | is($caller, 'MyExporter', "With_caller prototype code gets called from MyMooseX"); | |
12 | }; | |
53a4d826 | 13 | } "check function with prototype"; |
badbc528 | 14 | |
53a4d826 | 15 | lives_and { |
badbc528 | 16 | as_is_prototype { |
17 | my $caller = caller(0); | |
18 | is($caller, 'MyExporter', "As-is prototype code gets called from MyMooseX"); | |
19 | }; | |
53a4d826 | 20 | } "check function with prototype"; |
a28e50e4 | 21 | |
22 | done_testing; |