+#!perl -w
use strict;
BEGIN {
- chdir 't' if -d 't';
- @INC = qw(../lib);
+ chdir 't' if -d 't';
+ require './test.pl';
}
use File::Copy ();
use File::Path ();
use File::Spec ();
-use Test::More tests => 10;
+plan(tests => 10);
my $test_dir = File::Spec->catdir(qw(lib deprecate));
chdir $test_dir or die "Can't chdir $test_dir";
sitearchexp => 0,
);
+no warnings 'once';
local %deprecate::Config = (%libdir);
my $module = 'Deprecated.pm';
}
delete $INC{$module};
- unlink $pm;
+ unlink_all $pm;
}
my $sub_dir = 'Optionally';
}
delete $INC{"$sub_dir/$module"};
- unlink $pm;
+ unlink_all $pm;
}
END { File::Path::remove_tree('lib') }