summaryrefslogtreecommitdiffstats
path: root/t/moose/021_export_with_prototype.t
diff options
context:
space:
mode:
Diffstat (limited to 't/moose/021_export_with_prototype.t')
-rw-r--r--t/moose/021_export_with_prototype.t22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/moose/021_export_with_prototype.t b/t/moose/021_export_with_prototype.t
new file mode 100644
index 0000000..6c8f5e2
--- /dev/null
+++ b/t/moose/021_export_with_prototype.t
@@ -0,0 +1,22 @@
+use lib "t/lib";
+package MyExporter::User;
+use MyExporter;
+
+use Test::More;
+use Test::Exception;
+
+lives_and {
+ with_prototype {
+ my $caller = caller(0);
+ is($caller, 'MyExporter', "With_caller prototype code gets called from MyMooseX");
+ };
+} "check function with prototype";
+
+lives_and {
+ as_is_prototype {
+ my $caller = caller(0);
+ is($caller, 'MyExporter', "As-is prototype code gets called from MyMooseX");
+ };
+} "check function with prototype";
+
+done_testing;