From b143661891469f9b9162dab3290b06176a72c6a3 Mon Sep 17 00:00:00 2001 From: Nicolas R Date: Thu, 20 Dec 2018 10:06:09 -0600 Subject: [PATCH 1/3] Add a basic Travis CI configuration file --- .travis.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..78d1621 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +branches: + except: + - /^issue\d+/ + - /^gh\d+/ +language: perl +matrix: + fast_finish: true +# allow_failures: +# - perl: "5.12" +# - perl: "5.10" +env: + global: + - PERL_USE_UNSAFE_INC=0 + - AUTHOR_TESTING=1 + - AUTOMATED_TESTING=1 + - RELEASE_TESTING=1 +perl: + - "5.28" + - "5.26" + - "5.24" + - "5.22" + - "5.20" + - "5.18" + - "5.16" + - "5.14" + - "5.12" + - "5.10" +script: + - perl Makefile.PL && make test + From 0c7d0a504623f2a64406c0400d27b16b3fe807cd Mon Sep 17 00:00:00 2001 From: Nicolas R Date: Thu, 20 Dec 2018 10:09:10 -0600 Subject: [PATCH 2/3] Add a basic .gitignore file This is a draft, we can probably find some extra entries to add there. --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f6f26a4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +MYMETA.json +MYMETA.yml +Makefile +blib +pm_to_blib +Perlbal-* From 1fd0143a24621df880b42fcfa480540f78326a2f Mon Sep 17 00:00:00 2001 From: Nicolas R Date: Thu, 20 Dec 2018 10:12:03 -0600 Subject: [PATCH 3/3] Remove useless 'use lib' Unit tests do not need to add 'use lib "lib"', running 'prove -l' will automatically add it for you. Concerning the two other scripts, it's unsafe to add 'lib' to @INC, as this could result from loading .pm files from any location. (depending from where the command is run and which user is running it). Once installed, it will use the default Perl @INC locations. For development purpose, adding a -Ilib is probably better. Using FindBin can be aceptable but also leaves a hole as the lib directory might belong to a different user in production. --- devtools/gendocs.pl | 1 - perlbal | 1 - t/77-plugin-throttle.t | 2 -- t/78-plugin-xffextras.t | 2 -- 4 files changed, 6 deletions(-) diff --git a/devtools/gendocs.pl b/devtools/gendocs.pl index e5a0553..884ac64 100755 --- a/devtools/gendocs.pl +++ b/devtools/gendocs.pl @@ -3,7 +3,6 @@ use strict; use FindBin; -use lib "$FindBin::Bin/../lib"; use Perlbal; my $tunables = Perlbal::Service::autodoc_get_tunables(); diff --git a/perlbal b/perlbal index f4fef81..7d75dcc 100755 --- a/perlbal +++ b/perlbal @@ -32,7 +32,6 @@ You can use and redistribute Perlbal under the same terms as Perl itself. use strict; use warnings; -use lib 'lib'; use Perlbal; my $opt_daemonize; diff --git a/t/77-plugin-throttle.t b/t/77-plugin-throttle.t index 74f1bb8..35f24b2 100644 --- a/t/77-plugin-throttle.t +++ b/t/77-plugin-throttle.t @@ -1,8 +1,6 @@ use strict; use warnings; -use lib 't/lib'; - use IO::Select; use Perlbal::Test; use Perlbal::Test::WebClient; diff --git a/t/78-plugin-xffextras.t b/t/78-plugin-xffextras.t index bd6e1cb..d04478b 100644 --- a/t/78-plugin-xffextras.t +++ b/t/78-plugin-xffextras.t @@ -1,8 +1,6 @@ use strict; use warnings; -use lib 't/lib'; - use Perlbal::Test; use Perlbal::Test::WebClient; use Perlbal::Test::WebServer;