Skip to content

Commit 5c57982

Browse files
pliceasewchristian
authored andcommitted
do not rely on '.' being in @inc
As of 5.25.7, Perl can be configured to not include '.' in @inc by default. Update Makefile to use lib '.' so that it can find Module::Install on systems that do not have it already (and use the local version in preference to the system in versions that do). Also rename the tests in 't/lib' and add *just* that directory to @inc.
1 parent addc11f commit 5c57982

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+149
-85
lines changed

Makefile.PL

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use strict;
22
use warnings;
33

4+
use lib '.';
45
use inc::Module::Install 1.10;
56

67
all_from 'lib/PPI.pm';

t/01_compile.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
# This test script only tests that the tree compiles
44

5-
use t::lib::PPI::Test::pragmas;
5+
use lib 't/lib';
6+
use PPI::Test::pragmas;
67
use Test::More tests => 17 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
78

89

t/03_document.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
# PPI::Document tests
44

5-
use t::lib::PPI::Test::pragmas;
5+
use lib 't/lib';
6+
use PPI::Test::pragmas;
67
use Test::More tests => 13 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
78

89
use File::Spec::Functions ':ALL';

t/04_element.t

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
# This does an empiric test that when we try to parse something,
66
# something ( anything ) comes out the other side.
77

8-
use t::lib::PPI::Test::pragmas;
8+
use lib 't/lib';
9+
use PPI::Test::pragmas;
910
use Test::More tests => 220 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
1011

1112
use File::Spec::Functions ':ALL';
1213
use PPI;
1314
use Scalar::Util 'refaddr';
14-
use t::lib::PPI::Test 'pause';
15+
use PPI::Test 'pause';
1516

1617

1718
sub is_object {

t/05_lexer.t

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
# Compare a large number of specific code samples (.code)
44
# with the expected Lexer dumps (.dump).
55

6-
use t::lib::PPI::Test::pragmas;
6+
use lib 't/lib';
7+
use PPI::Test::pragmas;
78
use Test::More tests => 218 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
89

910
use File::Spec::Functions ':ALL';
1011
use PPI::Lexer;
11-
use t::lib::PPI::Test::Run;
12+
use PPI::Test::Run;
1213

1314
#####################################################################
1415
# Code/Dump Testing
1516

16-
t::lib::PPI::Test::Run->run_testdir( catdir( 't', 'data', '05_lexer' ) );
17+
PPI::Test::Run->run_testdir( catdir( 't', 'data', '05_lexer' ) );

t/06_round_trip.t

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
# Load ALL of the PPI files, lex them in, dump them
44
# out, and verify that the code goes in and out cleanly.
55

6-
use t::lib::PPI::Test::pragmas;
6+
use lib 't/lib';
7+
use PPI::Test::pragmas;
78
use Test::More; # Plan comes later
89

910
use File::Spec::Functions ':ALL';
1011
use PPI;
11-
use t::lib::PPI::Test 'find_files';
12+
use PPI::Test 'find_files';
1213

1314

1415

t/07_token.t

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
# Formal unit tests for specific PPI::Token classes
44

5-
use t::lib::PPI::Test::pragmas;
5+
use lib 't/lib';
6+
use PPI::Test::pragmas;
67
use Test::More tests => 570 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
78

89
use File::Spec::Functions ':ALL';
910
use PPI;
10-
use t::lib::PPI::Test::Run;
11+
use PPI::Test::Run;
1112

1213

1314

@@ -16,11 +17,11 @@ use t::lib::PPI::Test::Run;
1617
#####################################################################
1718
# Code/Dump Testing
1819

19-
t::lib::PPI::Test::Run->run_testdir( catdir( 't', 'data', '07_token' ) );
20+
PPI::Test::Run->run_testdir( catdir( 't', 'data', '07_token' ) );
2021

2122
{
2223
local $ENV{TODO} = "known bug";
23-
t::lib::PPI::Test::Run->run_testdir( catdir( 't', 'data', '07_token_todo' ) );
24+
PPI::Test::Run->run_testdir( catdir( 't', 'data', '07_token_todo' ) );
2425
}
2526

2627

t/08_regression.t

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@
44

55
# Some other regressions tests are included here for simplicity.
66

7-
use t::lib::PPI::Test::pragmas;
7+
use lib 't/lib';
8+
use PPI::Test::pragmas;
89
use Test::More tests => 925 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
910

1011
use PPI;
11-
use t::lib::PPI::Test 'pause';
12-
use t::lib::PPI::Test::Run;
12+
use PPI::Test 'pause';
13+
use PPI::Test::Run;
1314

1415

1516

1617
#####################################################################
1718
# Code/Dump Testing
1819

19-
t::lib::PPI::Test::Run->run_testdir(qw{ t data 08_regression });
20+
PPI::Test::Run->run_testdir(qw{ t data 08_regression });
2021

2122

2223

t/09_normal.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# Testing of the normalization functions.
44
# (only very basic at this point)
55

6-
use t::lib::PPI::Test::pragmas;
6+
use lib 't/lib';
7+
use PPI::Test::pragmas;
78
use Test::More tests => 17 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
89

910
use File::Spec::Functions ':ALL';

t/10_statement.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
# Test the various PPI::Statement packages
44

5-
use t::lib::PPI::Test::pragmas;
5+
use lib 't/lib';
6+
use PPI::Test::pragmas;
67
use Test::More tests => 5 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
78

89
use PPI;

0 commit comments

Comments
 (0)