Commit | Line | Data |
2b12c1b8 |
1 | use strict; |
2 | use warnings; |
7487778d |
3 | use Test::More tests => 2; |
2b12c1b8 |
4 | use File::Temp qw(tempdir); |
5 | use Cwd; |
6 | |
7 | # Test that refs in @INC don't get mangled. |
8 | |
2b12c1b8 |
9 | |
10 | my $dir = tempdir('test_local_lib-XXXXX', DIR => Cwd::abs_path('t'), CLEANUP => 1); |
11 | |
12 | use local::lib (); |
13 | my $code = sub {}; |
14 | push(@INC, $code); |
15 | local::lib->import($dir); |
16 | ok grep({ $_ eq $code } @INC), 'Can find code ref in @INC'; |
17 | ok grep({ ref $_ } @INC), 'It really is a ref, not stringified'; |
18 | |