diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-07-11 06:19:27 -0700 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-07-11 06:19:27 -0700 |
commit | 7c17555866cf966c5667c43700861cca0245e651 (patch) | |
tree | 0aaea70c24f0984411258f3c22fe6f5c604e14f0 | |
parent | b2e86fd5fd3ac9ad25c22b369e166e2657794ba2 (diff) | |
parent | 6297a07c4d3216a6aa208859f2723cae6c633230 (diff) | |
download | exporter-lexical-master.tar.gz exporter-lexical-master.zip |
Test that exported subs are truly lexical
-rw-r--r-- | t/cross-package.t | 18 |
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; |