summaryrefslogtreecommitdiffstats
path: root/t/moose/021_export_with_prototype.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2010-07-19 19:10:14 -0500
committerJesse Luehrs <doy@tozt.net>2010-07-19 19:10:14 -0500
commit636f22f307ff0dc94a2c2ec23d49c872ecddbc02 (patch)
treedab6dc4bc564c61d6a1ace5727238574cfd5ce2b /t/moose/021_export_with_prototype.t
parentbdd9773b60d3cf2cceea43b4aa1dacd9ed5d492b (diff)
downloadmoosex-exporter-easy-636f22f307ff0dc94a2c2ec23d49c872ecddbc02.tar.gz
moosex-exporter-easy-636f22f307ff0dc94a2c2ec23d49c872ecddbc02.zip
initial implementation
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;