]> iEval git - www-offliberty.git/commitdiff
Make module compatible with perl 5.8.9
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 12 Jul 2015 13:58:33 +0000 (16:58 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 12 Jul 2015 13:58:33 +0000 (16:58 +0300)
Makefile.PL
lib/WWW/Offliberty.pm
off
t/00-load.t
t/50-network.t

index 74979fe2aa3b67fae31b3ae510be8a5f36041668..6dbd1dc891defb4a8c22f9704d15827587ed1582 100644 (file)
@@ -1,5 +1,8 @@
 use ExtUtils::MakeMaker;
-use 5.014000;
+use strict;
+use warnings;
+
+my $has_br = $ExtUtils::MakeMaker::VERSION >= 6.5503;
 
 WriteMakefile(
        NAME             => 'WWW::Offliberty',
@@ -7,15 +10,16 @@ WriteMakefile(
        ABSTRACT_FROM    => 'lib/WWW/Offliberty.pm',
        AUTHOR           => 'Marius Gavrilescu <marius@ieval.ro>',
        EXE_FILES        => ['off'],
-       MIN_PERL_VERSION => '5.14.0',
+       MIN_PERL_VERSION => '5.8.9',
        LICENSE          => 'perl',
-       BUILD_REQUIRES    => {
+       (BUILD_REQUIRES => {
                qw/Test::RequiresInternet 0/,
-       },
+       }) x $has_br,
        SIGN             => 1,
        PREREQ_PM        => {
                qw/HTML::TreeBuilder 0
                   HTTP::Tiny        0/,
+               ('Test::RequiresInternet' => 0) x !$has_br
        },
        META_ADD         => {
                dynamic_config => 0,
index a8ca5769313c192d729bfa7400d59dd89d7146eb..f89e0d6a2ed63d22f63dec8c41c973591b9c8aa4 100644 (file)
@@ -1,6 +1,6 @@
 package WWW::Offliberty;
 
-use 5.014;
+use 5.008009;
 use strict;
 use warnings;
 use parent qw/Exporter/;
diff --git a/off b/off
index c0f018eb542eca60401dad7ad0d41b872af2859e..c4183c0f4b6d617aec86d2965ffeb0a1cff5b515 100755 (executable)
--- a/off
+++ b/off
@@ -1,13 +1,13 @@
-#!/usr/bin/perl -w
-use v5.14;
+#!/usr/bin/perl
+use 5.008009;
+use strict;
+use warnings;
 
 use Getopt::Long qw/GetOptions/;
 use WWW::Offliberty qw/off/;
 
-my %params;
-$, = "\n";
-GetOptions ('param=s' => \%params);
-say off shift, %params;
+GetOptions ('param=s' => \my %params);
+print "$_\n" for off shift, %params;
 
 __END__
 
index f8006582c7eb690fcb84592ce94e0196a7a59709..6072a91444316840c253c0538e3c5c539ae7e5a3 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 use strict;
 use warnings;
 
index 59e77b158ca3fc75a5967e891866b8afb06bee35..44d9a9854da00d94379203997902177aed7f89be 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 use strict;
 use warnings;
 
This page took 0.034684 seconds and 4 git commands to generate.