diff options
author | Toby Inkster <mail@tobyinkster.co.uk> | 2013-07-11 10:49:57 +0100 |
---|---|---|
committer | Toby Inkster <mail@tobyinkster.co.uk> | 2013-07-11 10:49:57 +0100 |
commit | 6297a07c4d3216a6aa208859f2723cae6c633230 (patch) | |
tree | 0aaea70c24f0984411258f3c22fe6f5c604e14f0 /t/cross-package.t | |
parent | b2e86fd5fd3ac9ad25c22b369e166e2657794ba2 (diff) | |
download | exporter-lexical-6297a07c4d3216a6aa208859f2723cae6c633230.tar.gz exporter-lexical-6297a07c4d3216a6aa208859f2723cae6c633230.zip |
test that exported functions cross package boundaries like true lexical subs (this test already passes)
Diffstat (limited to 't/cross-package.t')
-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; |