summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--t/cross-package.t18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/cross-package.t b/t/cross-package.t
new file mode 100644
index 0000000..b62f041
--- /dev/null
+++ b/t/cross-package.t
@@ -0,0 +1,18 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+use Exporter::Lexical ();
+
+sub foo { 'foo' }
+
+is(foo(), "foo");
+{
+ BEGIN { Exporter::Lexical::lexical_import(foo => sub { "FOO" }) }
+ package Forget::Me::Not;
+ ::is(foo(), "FOO");
+}
+is(foo(), "foo");
+
+done_testing;