Commit | Line | Data |
a9489cb0 |
1 | use strict; |
2 | use warnings; |
3 | use Test::More; |
4 | use File::Temp qw(tempdir); |
5 | use Cwd; |
6 | |
1f8043c8 |
7 | plan tests => 2; |
a9489cb0 |
8 | |
9 | my $dir = tempdir('test_local_lib-XXXXX', DIR => Cwd::abs_path('t'), CLEANUP => 1); |
10 | |
11 | use local::lib (); |
12 | local::lib->import($dir); |
13 | local::lib->import($dir); |
14 | |
15 | { |
16 | my (%inc, %perl5lib); |
17 | map { $inc{$_}++ } @INC; |
18 | map { $perl5lib{$_} } split /:/, $ENV{PERL5LIB}; |
19 | ok ! grep({ $inc{$_} > 1 } keys %inc), '@INC entries not duplicated'; |
a9489cb0 |
20 | ok ! grep({ $perl5lib{$_} > 1 } keys %perl5lib), 'ENV{PERL5LIB} entries not duplicated'; |
21 | } |