summaryrefslogtreecommitdiffstats
path: root/t/cross-package.t
blob: b62f0414a2ae4ce4b752bd355e2f811e1562ce25 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;