diff options
19 files changed, 12 insertions, 45 deletions
diff --git a/dist/ExtUtils-ParseXS/t/001-basic.t b/dist/ExtUtils-ParseXS/t/001-basic.t index 414a681fc0..755be52aca 100644 --- a/dist/ExtUtils-ParseXS/t/001-basic.t +++ b/dist/ExtUtils-ParseXS/t/001-basic.t @@ -10,7 +10,7 @@ my ($source_file, $obj_file, $lib_file); require_ok( 'ExtUtils::ParseXS' ); -chdir 't' or die "Can't chdir to t/, $!"; +chdir('t') if -d 't'; use Carp; $SIG{__WARN__} = \&Carp::cluck; diff --git a/dist/ExtUtils-ParseXS/t/002-more.t b/dist/ExtUtils-ParseXS/t/002-more.t index 7973dced63..4178ec0264 100644 --- a/dist/ExtUtils-ParseXS/t/002-more.t +++ b/dist/ExtUtils-ParseXS/t/002-more.t @@ -16,7 +16,7 @@ my ($source_file, $obj_file, $lib_file); require_ok( 'ExtUtils::ParseXS' ); ExtUtils::ParseXS->import('process_file'); -chdir 't' or die "Can't chdir to t/, $!"; +chdir 't' if -d 't'; use Carp; $SIG{__WARN__} = \&Carp::cluck; diff --git a/dist/ExtUtils-ParseXS/t/003-usage.t b/dist/ExtUtils-ParseXS/t/003-usage.t index 40a58a4f8b..57d5140159 100644 --- a/dist/ExtUtils-ParseXS/t/003-usage.t +++ b/dist/ExtUtils-ParseXS/t/003-usage.t @@ -17,7 +17,7 @@ my ($source_file, $obj_file, $lib_file, $module); require_ok( 'ExtUtils::ParseXS' ); -chdir 't' or die "Can't chdir to t/, $!"; +chdir('t') if -d 't'; use Carp; $SIG{__WARN__} = \&Carp::cluck; diff --git a/dist/ExtUtils-ParseXS/t/004-nolinenumbers.t b/dist/ExtUtils-ParseXS/t/004-nolinenumbers.t index 4a1565a5e5..7ecbd59344 100644 --- a/dist/ExtUtils-ParseXS/t/004-nolinenumbers.t +++ b/dist/ExtUtils-ParseXS/t/004-nolinenumbers.t @@ -11,7 +11,7 @@ my ($source_file, $obj_file, $lib_file); require_ok( 'ExtUtils::ParseXS' ); ExtUtils::ParseXS->import('process_file'); -chdir 't' or die "Can't chdir to t/, $!"; +chdir('t') if -d 't'; use Carp; $SIG{__WARN__} = \&Carp::cluck; diff --git a/dist/ExtUtils-ParseXS/t/101-standard_typemap_locations.t b/dist/ExtUtils-ParseXS/t/101-standard_typemap_locations.t index 3de8d9d3b9..285090fed8 100644 --- a/dist/ExtUtils-ParseXS/t/101-standard_typemap_locations.t +++ b/dist/ExtUtils-ParseXS/t/101-standard_typemap_locations.t @@ -2,7 +2,6 @@ use strict; use warnings; use Test::More tests => 3; -use lib qw( lib ); use ExtUtils::ParseXS::Utilities qw( standard_typemap_locations ); diff --git a/dist/ExtUtils-ParseXS/t/102-trim_whitespace.t b/dist/ExtUtils-ParseXS/t/102-trim_whitespace.t index 65f70328f6..207b830fb3 100644 --- a/dist/ExtUtils-ParseXS/t/102-trim_whitespace.t +++ b/dist/ExtUtils-ParseXS/t/102-trim_whitespace.t @@ -2,7 +2,6 @@ use strict; use warnings; use Test::More tests => 5; -use lib qw( lib ); use ExtUtils::ParseXS::Utilities qw( trim_whitespace ); diff --git a/dist/ExtUtils-ParseXS/t/103-tidy_type.t b/dist/ExtUtils-ParseXS/t/103-tidy_type.t index 771fd307b0..fc4e3c6879 100644 --- a/dist/ExtUtils-ParseXS/t/103-tidy_type.t +++ b/dist/ExtUtils-ParseXS/t/103-tidy_type.t @@ -2,7 +2,6 @@ use strict; use warnings; use Test::More; -use lib qw( lib ); use ExtUtils::Typemaps; my @tests = ( diff --git a/dist/ExtUtils-ParseXS/t/104-map_type.t b/dist/ExtUtils-ParseXS/t/104-map_type.t index aea5846a02..4529c1332d 100644 --- a/dist/ExtUtils-ParseXS/t/104-map_type.t +++ b/dist/ExtUtils-ParseXS/t/104-map_type.t @@ -2,7 +2,6 @@ use strict; use warnings; use Test::More tests => 7; -use lib qw( lib ); use ExtUtils::ParseXS; use ExtUtils::ParseXS::Utilities qw( map_type diff --git a/dist/ExtUtils-ParseXS/t/105-valid_proto_string.t b/dist/ExtUtils-ParseXS/t/105-valid_proto_string.t index 926ebe6154..e8a32a8387 100644 --- a/dist/ExtUtils-ParseXS/t/105-valid_proto_string.t +++ b/dist/ExtUtils-ParseXS/t/105-valid_proto_string.t @@ -2,7 +2,6 @@ use strict; use warnings; use Test::More tests => 6; -use lib qw( lib ); use ExtUtils::ParseXS::Utilities qw( valid_proto_string ); diff --git a/dist/ExtUtils-ParseXS/t/106-process_typemaps.t b/dist/ExtUtils-ParseXS/t/106-process_typemaps.t index 0f28510e12..a20389ec1a 100644 --- a/dist/ExtUtils-ParseXS/t/106-process_typemaps.t +++ b/dist/ExtUtils-ParseXS/t/106-process_typemaps.t @@ -2,11 +2,9 @@ use strict; use warnings; use Carp; -use Cwd; -use File::Spec; +use Cwd qw(cwd); use File::Temp qw( tempdir ); use Test::More tests => 2; -use lib qw( lib ); use ExtUtils::ParseXS::Utilities qw( process_typemaps ); diff --git a/dist/ExtUtils-ParseXS/t/108-map_type.t b/dist/ExtUtils-ParseXS/t/108-map_type.t index ba08f6cb04..3f2823ae45 100644 --- a/dist/ExtUtils-ParseXS/t/108-map_type.t +++ b/dist/ExtUtils-ParseXS/t/108-map_type.t @@ -1,12 +1,7 @@ #!/usr/bin/perl use strict; use warnings; -use Carp; -use Cwd; -use File::Spec; -use File::Temp qw( tempdir ); use Test::More qw(no_plan); # tests => 7; -use lib qw( lib ); use ExtUtils::ParseXS::Utilities qw( map_type ); diff --git a/dist/ExtUtils-ParseXS/t/109-standard_XS_defs.t b/dist/ExtUtils-ParseXS/t/109-standard_XS_defs.t index 0cb7493f9d..0d11c47841 100644 --- a/dist/ExtUtils-ParseXS/t/109-standard_XS_defs.t +++ b/dist/ExtUtils-ParseXS/t/109-standard_XS_defs.t @@ -3,7 +3,8 @@ use strict; use warnings; $| = 1; use Test::More tests => 5; -use lib qw( lib t/lib ); +use File::Spec; +use lib (-d 't' ? File::Spec->catdir(qw(t lib)) : 'lib'); use ExtUtils::ParseXS::Utilities qw( standard_XS_defs ); diff --git a/dist/ExtUtils-ParseXS/t/110-assign_func_args.t b/dist/ExtUtils-ParseXS/t/110-assign_func_args.t index 63d978417b..2710338e80 100644 --- a/dist/ExtUtils-ParseXS/t/110-assign_func_args.t +++ b/dist/ExtUtils-ParseXS/t/110-assign_func_args.t @@ -1,12 +1,7 @@ #!/usr/bin/perl use strict; use warnings; -use Carp; -use Cwd; -use File::Spec; -use File::Temp qw( tempdir ); use Test::More qw(no_plan); # tests => 7; -use lib qw( lib ); use ExtUtils::ParseXS::Utilities qw( assign_func_args ); diff --git a/dist/ExtUtils-ParseXS/t/111-analyze_preprocessor_statements.t b/dist/ExtUtils-ParseXS/t/111-analyze_preprocessor_statements.t index b9d6d73b41..23f9faa10c 100644 --- a/dist/ExtUtils-ParseXS/t/111-analyze_preprocessor_statements.t +++ b/dist/ExtUtils-ParseXS/t/111-analyze_preprocessor_statements.t @@ -2,12 +2,7 @@ use strict; use warnings; $| = 1; -use Carp; -use Cwd; -use File::Spec; -use File::Temp qw( tempdir ); use Test::More qw(no_plan); # tests => 7; -use lib qw( lib ); use ExtUtils::ParseXS::Utilities qw( analyze_preprocessor_statements ); diff --git a/dist/ExtUtils-ParseXS/t/112-set_cond.t b/dist/ExtUtils-ParseXS/t/112-set_cond.t index d6578776fd..2a3a70fc4d 100644 --- a/dist/ExtUtils-ParseXS/t/112-set_cond.t +++ b/dist/ExtUtils-ParseXS/t/112-set_cond.t @@ -1,12 +1,7 @@ #!/usr/bin/perl use strict; use warnings; -use Carp; -use Cwd; -use File::Spec; -use File::Temp qw( tempdir ); use Test::More qw(no_plan); # tests => 7; -use lib qw( lib ); use ExtUtils::ParseXS::Utilities qw( set_cond ); diff --git a/dist/ExtUtils-ParseXS/t/113-check_cond_preproc_statements.t b/dist/ExtUtils-ParseXS/t/113-check_cond_preproc_statements.t index 55e3d4ba61..a5e9a7c68b 100644 --- a/dist/ExtUtils-ParseXS/t/113-check_cond_preproc_statements.t +++ b/dist/ExtUtils-ParseXS/t/113-check_cond_preproc_statements.t @@ -1,12 +1,9 @@ #!/usr/bin/perl use strict; use warnings; -use Carp; -use Cwd; use File::Spec; -use File::Temp qw( tempdir ); +use lib (-d 't' ? File::Spec->catdir(qw(t lib)) : 'lib'); use Test::More tests => 13; -use lib qw( lib t/lib ); use ExtUtils::ParseXS; use ExtUtils::ParseXS::Utilities qw( check_conditional_preprocessor_statements diff --git a/dist/ExtUtils-ParseXS/t/114-blurt_death_Warn.t b/dist/ExtUtils-ParseXS/t/114-blurt_death_Warn.t index 955b29b65b..e119e0db8c 100644 --- a/dist/ExtUtils-ParseXS/t/114-blurt_death_Warn.t +++ b/dist/ExtUtils-ParseXS/t/114-blurt_death_Warn.t @@ -2,12 +2,9 @@ use strict; use warnings; $| = 1; -use Carp; -use Cwd; -use File::Spec; -use File::Temp qw( tempdir ); use Test::More tests => 7; -use lib qw( lib t/lib ); +use File::Spec; +use lib (-d 't' ? File::Spec->catdir(qw(t lib)) : 'lib'); use ExtUtils::ParseXS; use ExtUtils::ParseXS::Utilities qw( Warn diff --git a/dist/ExtUtils-ParseXS/t/115-avoid-noise.t b/dist/ExtUtils-ParseXS/t/115-avoid-noise.t index 2a99748aff..b3bbe6177a 100644 --- a/dist/ExtUtils-ParseXS/t/115-avoid-noise.t +++ b/dist/ExtUtils-ParseXS/t/115-avoid-noise.t @@ -3,10 +3,10 @@ use strict; use warnings; use File::Spec; use Test::More tests => 1; -use lib qw( lib t/lib ); +use lib (-d 't' ? File::Spec->catdir(qw(t lib)) : 'lib'); use ExtUtils::ParseXS qw(process_file); -chdir 't' or die "Can't chdir to t/, $!"; +chdir('t') if -d 't'; # Module-Build uses ExtUtils::ParseXS with $^W set, try to avoid # warning in that case. diff --git a/dist/ExtUtils-ParseXS/t/517-t-targetable.t b/dist/ExtUtils-ParseXS/t/517-t-targetable.t index 1dc208d997..ec5d5ef67d 100644 --- a/dist/ExtUtils-ParseXS/t/517-t-targetable.t +++ b/dist/ExtUtils-ParseXS/t/517-t-targetable.t @@ -4,7 +4,6 @@ use warnings; use Carp; use Cwd; use File::Spec; -use File::Temp qw( tempdir ); use Test::More; use lib qw( lib ); use ExtUtils::Typemaps; |