Hello community, here is the log from the commit of package perl-Net-HTTP for openSUSE:Factory checked in at 2017-05-06 20:45:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Net-HTTP (Old) and /work/SRC/openSUSE:Factory/.perl-Net-HTTP.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Net-HTTP" Sat May 6 20:45:44 2017 rev:17 rq:492411 version:6.14 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Net-HTTP/perl-Net-HTTP.changes 2017-02-22 13:44:59.885231985 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Net-HTTP.new/perl-Net-HTTP.changes 2017-05-06 20:45:45.727614802 +0200 @@ -1,0 +2,11 @@ +Tue Apr 25 06:15:59 UTC 2017 - co...@suse.com + +- updated to 6.14 + see /usr/share/doc/packages/perl-Net-HTTP/Changes + + 6.14 2017-04-24 11:27:26-04:00 America/Toronto + - Improvements to live tests (Shoichi Kaji and Kent Fredric) + - Fix a bug where downloading files is sometimes very slow GH#44 (Shoichi + Kaji) + +------------------------------------------------------------------- Old: ---- Net-HTTP-6.13.tar.gz New: ---- Net-HTTP-6.14.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Net-HTTP.spec ++++++ --- /var/tmp/diff_new_pack.qHYbCn/_old 2017-05-06 20:45:46.767468112 +0200 +++ /var/tmp/diff_new_pack.qHYbCn/_new 2017-05-06 20:45:46.767468112 +0200 @@ -17,7 +17,7 @@ Name: perl-Net-HTTP -Version: 6.13 +Version: 6.14 Release: 0 %define cpan_name Net-HTTP Summary: Low-level HTTP connection (client) ++++++ Net-HTTP-6.13.tar.gz -> Net-HTTP-6.14.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/CONTRIBUTORS new/Net-HTTP-6.14/CONTRIBUTORS --- old/Net-HTTP-6.13/CONTRIBUTORS 2017-02-20 03:40:57.000000000 +0100 +++ new/Net-HTTP-6.14/CONTRIBUTORS 2017-04-24 17:27:31.000000000 +0200 @@ -41,6 +41,7 @@ * Jesse Luehrs * john9art * Karen Etheridge + * Kent Fredric * Lasse Makholm * Marinos Yannikos * Mark Overmeer @@ -59,6 +60,7 @@ * ruff * sasao * Sean M. Burke + * Shoichi Kaji * Slaven Rezic * Slaven Rezic * Spiros Denaxas diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/Changes new/Net-HTTP-6.14/Changes --- old/Net-HTTP-6.13/Changes 2017-02-20 03:40:57.000000000 +0100 +++ new/Net-HTTP-6.14/Changes 2017-04-24 17:27:31.000000000 +0200 @@ -1,5 +1,10 @@ Release history for Net-HTTP +6.14 2017-04-24 11:27:26-04:00 America/Toronto + - Improvements to live tests (Shoichi Kaji and Kent Fredric) + - Fix a bug where downloading files is sometimes very slow GH#44 (Shoichi + Kaji) + 6.13 2017-02-19 21:40:54-05:00 America/Toronto - use EWOULDBLOCK as well on all places where EAGAIN is used (GH PR#24) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/MANIFEST new/Net-HTTP-6.14/MANIFEST --- old/Net-HTTP-6.13/MANIFEST 2017-02-20 03:40:57.000000000 +0100 +++ new/Net-HTTP-6.14/MANIFEST 2017-04-24 17:27:31.000000000 +0200 @@ -16,6 +16,8 @@ lib/Net/HTTPS.pm perlcriticrc perltidyrc +t/00-report-prereqs.dd +t/00-report-prereqs.t t/http-nb.t t/http.t t/live-https.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/META.json new/Net-HTTP-6.14/META.json --- old/Net-HTTP-6.13/META.json 2017-02-20 03:40:57.000000000 +0100 +++ new/Net-HTTP-6.14/META.json 2017-04-24 17:27:31.000000000 +0200 @@ -51,8 +51,13 @@ } }, "test" : { + "recommends" : { + "CPAN::Meta" : "2.120900" + }, "requires" : { "Data::Dumper" : "0", + "ExtUtils::MakeMaker" : "0", + "File::Spec" : "0", "IO::Select" : "0", "Socket" : "0", "Test::More" : "0" @@ -73,7 +78,7 @@ "x_IRC" : "irc://irc.perl.org/#lwp", "x_MailingList" : "mailto:lib...@perl.org" }, - "version" : "6.13", + "version" : "6.14", "x_contributors" : [ "Adam Kennedy <ad...@cpan.org>", "Adam Sjogren <a...@koldfront.dk>", @@ -110,6 +115,7 @@ "Jesse Luehrs <d...@tozt.net>", "john9art <john9...@yahoo.com>", "Karen Etheridge <et...@cpan.org>", + "Kent Fredric <kentfred...@gmail.com>", "Lasse Makholm <la...@unity3d.com>", "Marinos Yannikos <m...@geizhals.at>", "Mark Overmeer <mar...@cpan.org>", @@ -128,6 +134,7 @@ "ruff <r...@ukrpost.net>", "sasao <sa...@yugen.org>", "Sean M. Burke <sbu...@cpan.org>", + "Shoichi Kaji <sk...@cpan.org>", "Slaven Rezic <sla...@rezic.de>", "Slaven Rezic <sre...@iconmobile.com>", "Spiros Denaxas <s.dena...@gmail.com>", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/META.yml new/Net-HTTP-6.14/META.yml --- old/Net-HTTP-6.13/META.yml 2017-02-20 03:40:57.000000000 +0100 +++ new/Net-HTTP-6.14/META.yml 2017-04-24 17:27:31.000000000 +0200 @@ -4,6 +4,8 @@ - 'Gisle Aas <gi...@activestate.com>' build_requires: Data::Dumper: '0' + ExtUtils::MakeMaker: '0' + File::Spec: '0' IO::Select: '0' Socket: '0' Test::More: '0' @@ -38,7 +40,7 @@ bugtracker: https://github.com/libwww-perl/Net-HTTP/issues homepage: https://github.com/libwww-perl/Net-HTTP repository: https://github.com/libwww-perl/Net-HTTP.git -version: '6.13' +version: '6.14' x_contributors: - 'Adam Kennedy <ad...@cpan.org>' - 'Adam Sjogren <a...@koldfront.dk>' @@ -75,6 +77,7 @@ - 'Jesse Luehrs <d...@tozt.net>' - 'john9art <john9...@yahoo.com>' - 'Karen Etheridge <et...@cpan.org>' + - 'Kent Fredric <kentfred...@gmail.com>' - 'Lasse Makholm <la...@unity3d.com>' - 'Marinos Yannikos <m...@geizhals.at>' - 'Mark Overmeer <mar...@cpan.org>' @@ -93,6 +96,7 @@ - 'ruff <r...@ukrpost.net>' - 'sasao <sa...@yugen.org>' - 'Sean M. Burke <sbu...@cpan.org>' + - 'Shoichi Kaji <sk...@cpan.org>' - 'Slaven Rezic <sla...@rezic.de>' - 'Slaven Rezic <sre...@iconmobile.com>' - 'Spiros Denaxas <s.dena...@gmail.com>' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/Makefile.PL new/Net-HTTP-6.14/Makefile.PL --- old/Net-HTTP-6.13/Makefile.PL 2017-02-20 03:40:57.000000000 +0100 +++ new/Net-HTTP-6.14/Makefile.PL 2017-04-24 17:27:31.000000000 +0200 @@ -29,11 +29,13 @@ }, "TEST_REQUIRES" => { "Data::Dumper" => 0, + "ExtUtils::MakeMaker" => 0, + "File::Spec" => 0, "IO::Select" => 0, "Socket" => 0, "Test::More" => 0 }, - "VERSION" => "6.13", + "VERSION" => "6.14", "test" => { "TESTS" => "t/*.t" } @@ -44,6 +46,8 @@ "Carp" => 0, "Compress::Raw::Zlib" => 0, "Data::Dumper" => 0, + "ExtUtils::MakeMaker" => 0, + "File::Spec" => 0, "IO::Select" => 0, "IO::Socket::INET" => 0, "IO::Uncompress::Gunzip" => 0, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/README.md new/Net-HTTP-6.14/README.md --- old/Net-HTTP-6.13/README.md 2017-02-20 03:40:57.000000000 +0100 +++ new/Net-HTTP-6.14/README.md 2017-04-24 17:27:31.000000000 +0200 @@ -4,7 +4,7 @@ # VERSION -version 6.13 +version 6.14 # SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/cpanfile new/Net-HTTP-6.14/cpanfile --- old/Net-HTTP-6.13/cpanfile 2017-02-20 03:40:57.000000000 +0100 +++ new/Net-HTTP-6.14/cpanfile 2017-04-24 17:27:31.000000000 +0200 @@ -16,11 +16,17 @@ on 'test' => sub { requires "Data::Dumper" => "0"; + requires "ExtUtils::MakeMaker" => "0"; + requires "File::Spec" => "0"; requires "IO::Select" => "0"; requires "Socket" => "0"; requires "Test::More" => "0"; }; +on 'test' => sub { + recommends "CPAN::Meta" => "2.120900"; +}; + on 'configure' => sub { requires "ExtUtils::MakeMaker" => "0"; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/dist.ini new/Net-HTTP-6.14/dist.ini --- old/Net-HTTP-6.13/dist.ini 2017-02-20 03:40:57.000000000 +0100 +++ new/Net-HTTP-6.14/dist.ini 2017-04-24 17:27:31.000000000 +0200 @@ -4,7 +4,7 @@ main_module = lib/Net/HTTP.pm copyright_holder = Gisle Aas copyright_year = 2001-2017 -version = 6.13 +version = 6.14 [MetaResources] x_IRC = irc://irc.perl.org/#lwp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/lib/Net/HTTP/Methods.pm new/Net-HTTP-6.14/lib/Net/HTTP/Methods.pm --- old/Net-HTTP-6.13/lib/Net/HTTP/Methods.pm 2017-02-20 03:40:57.000000000 +0100 +++ new/Net-HTTP-6.14/lib/Net/HTTP/Methods.pm 2017-04-24 17:27:31.000000000 +0200 @@ -1,5 +1,5 @@ package Net::HTTP::Methods; -$Net::HTTP::Methods::VERSION = '6.13'; +$Net::HTTP::Methods::VERSION = '6.14'; use strict; use warnings; use URI; @@ -269,23 +269,17 @@ or die "read timeout"; # consume all incoming bytes - while(1) { - my $bytes_read = $self->sysread($_, 1024, length); - if(defined $bytes_read) { - $new_bytes += $bytes_read; - last if $bytes_read < 1024; - # We got exactly 1024 bytes, so we need to select() to know if there is more data - last unless $self->can_read(0); - } - elsif($!{EINTR} || $!{EAGAIN} || $!{EWOULDBLOCK}) { - redo READ; - } - else { - # if we have already accumulated some data let's at - # least return that as a line - length or die "$what read failed: $!"; - last; - } + my $bytes_read = $self->sysread($_, 1024, length); + if(defined $bytes_read) { + $new_bytes += $bytes_read; + } + elsif($!{EINTR} || $!{EAGAIN} || $!{EWOULDBLOCK}) { + redo READ; + } + else { + # if we have already accumulated some data let's at + # least return that as a line + length or die "$what read failed: $!"; } # no line-ending, no new bytes @@ -657,7 +651,7 @@ =head1 VERSION -version 6.13 +version 6.14 =head1 AUTHOR diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/lib/Net/HTTP/NB.pm new/Net-HTTP-6.14/lib/Net/HTTP/NB.pm --- old/Net-HTTP-6.13/lib/Net/HTTP/NB.pm 2017-02-20 03:40:57.000000000 +0100 +++ new/Net-HTTP-6.14/lib/Net/HTTP/NB.pm 2017-04-24 17:27:31.000000000 +0200 @@ -1,5 +1,5 @@ package Net::HTTP::NB; -$Net::HTTP::NB::VERSION = '6.13'; +$Net::HTTP::NB::VERSION = '6.14'; use strict; use warnings; @@ -60,7 +60,7 @@ =head1 VERSION -version 6.13 +version 6.14 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/lib/Net/HTTP.pm new/Net-HTTP-6.14/lib/Net/HTTP.pm --- old/Net-HTTP-6.13/lib/Net/HTTP.pm 2017-02-20 03:40:57.000000000 +0100 +++ new/Net-HTTP-6.14/lib/Net/HTTP.pm 2017-04-24 17:27:31.000000000 +0200 @@ -1,5 +1,5 @@ package Net::HTTP; -$Net::HTTP::VERSION = '6.13'; +$Net::HTTP::VERSION = '6.14'; use strict; use warnings; @@ -50,7 +50,7 @@ =head1 VERSION -version 6.13 +version 6.14 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/lib/Net/HTTPS.pm new/Net-HTTP-6.14/lib/Net/HTTPS.pm --- old/Net-HTTP-6.13/lib/Net/HTTPS.pm 2017-02-20 03:40:57.000000000 +0100 +++ new/Net-HTTP-6.14/lib/Net/HTTPS.pm 2017-04-24 17:27:31.000000000 +0200 @@ -1,5 +1,5 @@ package Net::HTTPS; -$Net::HTTPS::VERSION = '6.13'; +$Net::HTTPS::VERSION = '6.14'; use strict; use warnings; @@ -90,7 +90,7 @@ =head1 VERSION -version 6.13 +version 6.14 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/t/00-report-prereqs.dd new/Net-HTTP-6.14/t/00-report-prereqs.dd --- old/Net-HTTP-6.13/t/00-report-prereqs.dd 1970-01-01 01:00:00.000000000 +0100 +++ new/Net-HTTP-6.14/t/00-report-prereqs.dd 2017-04-24 17:27:31.000000000 +0200 @@ -0,0 +1,46 @@ +do { my $x = { + 'configure' => { + 'requires' => { + 'ExtUtils::MakeMaker' => '0' + }, + 'suggests' => { + 'JSON::PP' => '2.27300' + } + }, + 'runtime' => { + 'requires' => { + 'Carp' => '0', + 'Compress::Raw::Zlib' => '0', + 'IO::Socket::INET' => '0', + 'IO::Uncompress::Gunzip' => '0', + 'URI' => '0', + 'base' => '0', + 'perl' => '5.006002', + 'strict' => '0', + 'vars' => '0', + 'warnings' => '0' + }, + 'suggests' => { + 'IO::Socket' => '0', + 'IO::Socket::INET6' => '0', + 'IO::Socket::IP' => '0', + 'IO::Socket::SSL' => '1.38', + 'Symbol' => '0' + } + }, + 'test' => { + 'recommends' => { + 'CPAN::Meta' => '2.120900' + }, + 'requires' => { + 'Data::Dumper' => '0', + 'ExtUtils::MakeMaker' => '0', + 'File::Spec' => '0', + 'IO::Select' => '0', + 'Socket' => '0', + 'Test::More' => '0' + } + } + }; + $x; + } \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/t/00-report-prereqs.t new/Net-HTTP-6.14/t/00-report-prereqs.t --- old/Net-HTTP-6.13/t/00-report-prereqs.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Net-HTTP-6.14/t/00-report-prereqs.t 2017-04-24 17:27:31.000000000 +0200 @@ -0,0 +1,183 @@ +#!perl + +use strict; +use warnings; + +# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.025 + +use Test::More tests => 1; + +use ExtUtils::MakeMaker; +use File::Spec; + +# from $version::LAX +my $lax_version_re = + qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? + | + (?:\.[0-9]+) (?:_[0-9]+)? + ) | (?: + v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? + | + (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? + ) + )/x; + +# hide optional CPAN::Meta modules from prereq scanner +# and check if they are available +my $cpan_meta = "CPAN::Meta"; +my $cpan_meta_pre = "CPAN::Meta::Prereqs"; +my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic + +# Verify requirements? +my $DO_VERIFY_PREREQS = 1; + +sub _max { + my $max = shift; + $max = ( $_ > $max ) ? $_ : $max for @_; + return $max; +} + +sub _merge_prereqs { + my ($collector, $prereqs) = @_; + + # CPAN::Meta::Prereqs object + if (ref $collector eq $cpan_meta_pre) { + return $collector->with_merged_prereqs( + CPAN::Meta::Prereqs->new( $prereqs ) + ); + } + + # Raw hashrefs + for my $phase ( keys %$prereqs ) { + for my $type ( keys %{ $prereqs->{$phase} } ) { + for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { + $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; + } + } + } + + return $collector; +} + +my @include = qw( + +); + +my @exclude = qw( + +); + +# Add static prereqs to the included modules list +my $static_prereqs = do 't/00-report-prereqs.dd'; + +# Merge all prereqs (either with ::Prereqs or a hashref) +my $full_prereqs = _merge_prereqs( + ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), + $static_prereqs +); + +# Add dynamic prereqs to the included modules list (if we can) +my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; +if ( $source && $HAS_CPAN_META + && (my $meta = eval { CPAN::Meta->load_file($source) } ) +) { + $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); +} +else { + $source = 'static metadata'; +} + +my @full_reports; +my @dep_errors; +my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; + +# Add static includes into a fake section +for my $mod (@include) { + $req_hash->{other}{modules}{$mod} = 0; +} + +for my $phase ( qw(configure build test runtime develop other) ) { + next unless $req_hash->{$phase}; + next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); + + for my $type ( qw(requires recommends suggests conflicts modules) ) { + next unless $req_hash->{$phase}{$type}; + + my $title = ucfirst($phase).' '.ucfirst($type); + my @reports = [qw/Module Want Have/]; + + for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { + next if $mod eq 'perl'; + next if grep { $_ eq $mod } @exclude; + + my $file = $mod; + $file =~ s{::}{/}g; + $file .= ".pm"; + my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; + + my $want = $req_hash->{$phase}{$type}{$mod}; + $want = "undef" unless defined $want; + $want = "any" if !$want && $want == 0; + + my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; + + if ($prefix) { + my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); + $have = "undef" unless defined $have; + push @reports, [$mod, $want, $have]; + + if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { + if ( $have !~ /\A$lax_version_re\z/ ) { + push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; + } + elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { + push @dep_errors, "$mod version '$have' is not in required range '$want'"; + } + } + } + else { + push @reports, [$mod, $want, "missing"]; + + if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { + push @dep_errors, "$mod is not installed ($req_string)"; + } + } + } + + if ( @reports ) { + push @full_reports, "=== $title ===\n\n"; + + my $ml = _max( map { length $_->[0] } @reports ); + my $wl = _max( map { length $_->[1] } @reports ); + my $hl = _max( map { length $_->[2] } @reports ); + + if ($type eq 'modules') { + splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; + push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; + } + else { + splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; + push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; + } + + push @full_reports, "\n"; + } + } +} + +if ( @full_reports ) { + diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; +} + +if ( @dep_errors ) { + diag join("\n", + "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n", + "The following REQUIRED prerequisites were not satisfied:\n", + @dep_errors, + "\n" + ); +} + +pass; + +# vim: ts=4 sts=4 sw=4 et: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/t/live-https.t new/Net-HTTP-6.14/t/live-https.t --- old/Net-HTTP-6.13/t/live-https.t 2017-02-20 03:40:57.000000000 +0100 +++ new/Net-HTTP-6.14/t/live-https.t 2017-04-24 17:27:31.000000000 +0200 @@ -1,18 +1,18 @@ BEGIN { - unless ( -f "t/LIVE_TESTS" || -f "LIVE_TESTS" ) { - print "1..0 # SKIP Live tests disabled; pass --live-tests to Makefile.PL to enable\n"; + if ( $ENV{NO_NETWORK_TESTING} ) { + print "1..0 # SKIP Live tests disabled due to NO_NETWORK_TESTING\n"; exit; } eval { require IO::Socket::INET; my $s = IO::Socket::INET->new( - PeerHost => "www.google.com:443", + PeerHost => "www.cpan.org:443", Timeout => 5, ); die "Can't connect: $@" unless $s; }; if ($@) { - print "1..0 # SKIP Can't connect to www.google.com:443\n"; + print "1..0 # SKIP Can't connect to www.cpan.org:443\n"; print $@; exit; } @@ -32,7 +32,7 @@ use Net::HTTPS; my $s = Net::HTTPS->new( - Host => "www.google.com", + Host => "www.cpan.org", KeepAlive => 1, Timeout => 15, PeerHTTPVersion => "1.1", @@ -63,12 +63,9 @@ $buf .= $tmp; } $buf =~ s/\r//g; - - # ( my $out = $buf ) =~ s/^/# /gm; - # print $out; - is( $code, "200" ); + ok( $code == 302 || $code == 200, 'success' ); like( $h{'Content-Type'}, qr{text/html} ); - like( $buf, qr{</html>} ); + like( $buf, qr{</html>}i ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/t/live.t new/Net-HTTP-6.14/t/live.t --- old/Net-HTTP-6.13/t/live.t 2017-02-20 03:40:57.000000000 +0100 +++ new/Net-HTTP-6.14/t/live.t 2017-04-24 17:27:31.000000000 +0200 @@ -1,18 +1,18 @@ BEGIN { - unless ( -f "t/LIVE_TESTS" || -f "LIVE_TESTS" ) { - print "1..0 # SKIP Live tests disabled; pass --live-tests to Makefile.PL to enable\n"; + if ( $ENV{NO_NETWORK_TESTING} ) { + print "1..0 # SKIP Live tests disabled due to NO_NETWORK_TESTING\n"; exit; } eval { require IO::Socket::INET; my $s = IO::Socket::INET->new( - PeerHost => "www.google.com:80", + PeerHost => "www.cpan.org:80", Timeout => 5, ); die "Can't connect: $@" unless $s; }; if ($@) { - print "1..0 # SKIP Can't connect to www.google.com\n"; + print "1..0 # SKIP Can't connect to www.cpan.org\n"; print $@; exit; } @@ -26,7 +26,7 @@ use Net::HTTP; my $s = Net::HTTP->new( - Host => "www.google.com", + Host => "www.cpan.org", KeepAlive => 1, Timeout => 15, PeerHTTPVersion => "1.1", @@ -57,12 +57,9 @@ $buf .= $tmp; } $buf =~ s/\r//g; - - # ( my $out = $buf ) =~ s/^/# /gm; - # print $out; - is( $code, "200" ); + ok( $code == 302 || $code == 200, 'success' ); like( $h{'Content-Type'}, qr{text/html} ); - like( $buf, qr{</html>} ); + like( $buf, qr{</html>}i ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-HTTP-6.13/t/rt-112313.t new/Net-HTTP-6.14/t/rt-112313.t --- old/Net-HTTP-6.13/t/rt-112313.t 2017-02-20 03:40:57.000000000 +0100 +++ new/Net-HTTP-6.14/t/rt-112313.t 2017-04-24 17:27:31.000000000 +0200 @@ -1,3 +1,23 @@ +BEGIN { + if ( $ENV{NO_NETWORK_TESTING} ) { + print "1..0 # SKIP Live tests disabled due to NO_NETWORK_TESTING\n"; + exit; + } + eval { + require IO::Socket::INET; + my $s = IO::Socket::INET->new( + PeerHost => "httpbin.org:80", + Timeout => 5, + ); + die "Can't connect: $@" unless $s; + }; + if ($@) { + print "1..0 # SKIP Can't connect to httpbin.org\n"; + print $@; + exit; + } +} + use strict; use warnings; use Test::More; @@ -15,11 +35,6 @@ # So, we check that the reponse growth is only one byte after each iteration and also test multiple # times across the 1024, 2048 and 3072 boundaries... -unless (-f "t/LIVE_TESTS" || -f "LIVE_TESTS") -{ - print "1..0 # SKIP Live tests disabled; pass --live-tests to Makefile.PL to enable\n"; - exit; -} sub try {