diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-07-10 14:17:52 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-07-10 14:17:52 -0400 |
commit | 818958abaf7ad4f86101f88e74caf688b23be9a3 (patch) | |
tree | 0dca925e22a60be5b63405e49c531d1ca93d9d2c /t | |
parent | a571380fee1cfd63ba816842df95777ac9b2b0cb (diff) | |
download | exporter-lexical-818958abaf7ad4f86101f88e74caf688b23be9a3.tar.gz exporter-lexical-818958abaf7ad4f86101f88e74caf688b23be9a3.zip |
initial (non-working) implementation
Diffstat (limited to 't')
-rw-r--r-- | t/basic.t | 17 | ||||
-rw-r--r-- | t/exporter.t | 16 | ||||
-rw-r--r-- | t/lib/Foo.pm | 11 |
3 files changed, 44 insertions, 0 deletions
diff --git a/t/basic.t b/t/basic.t new file mode 100644 index 0000000..f7321e9 --- /dev/null +++ b/t/basic.t @@ -0,0 +1,17 @@ +#!/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" }) } + is(foo(), "FOO"); +} +is(foo(), "foo"); + +done_testing; diff --git a/t/exporter.t b/t/exporter.t new file mode 100644 index 0000000..da39d6a --- /dev/null +++ b/t/exporter.t @@ -0,0 +1,16 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use Test::More; +use lib 't/lib'; + +sub foo { 'foo' } + +is(foo(), "foo"); +{ + use Foo; + is(foo(), "FOO"); +} +is(foo(), "foo"); + +done_testing; diff --git a/t/lib/Foo.pm b/t/lib/Foo.pm new file mode 100644 index 0000000..14521ad --- /dev/null +++ b/t/lib/Foo.pm @@ -0,0 +1,11 @@ +package Foo; +use strict; +use warnings; + +use Exporter::Lexical; + +our @EXPORT = ('foo'); + +sub foo { "FOO" } + +1; |