use our wrapper for creating a local::lib dir, normalizing for win32 paths
[p5sagit/local-lib.git] / t / coderefs_in_inc.t
CommitLineData
2b12c1b8 1use strict;
2use warnings;
3use Test::More;
4use File::Temp qw(tempdir);
5use Cwd;
6
7# Test that refs in @INC don't get mangled.
8
9plan tests => 2;
10
11my $dir = tempdir('test_local_lib-XXXXX', DIR => Cwd::abs_path('t'), CLEANUP => 1);
12
13use local::lib ();
14my $code = sub {};
15push(@INC, $code);
16local::lib->import($dir);
17ok grep({ $_ eq $code } @INC), 'Can find code ref in @INC';
18ok grep({ ref $_ } @INC), 'It really is a ref, not stringified';
19