From: DongHun Kwak Date: Thu, 21 Jul 2022 02:28:25 +0000 (+0900) Subject: Imported Upstream version 6.40 X-Git-Tag: upstream/6.40^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21d73810ac9d6e239a185df4564818e8445d415f;p=platform%2Fupstream%2Fperl-libwww-perl.git Imported Upstream version 6.40 --- diff --git a/Changes b/Changes index ac21915..372377f 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,15 @@ Change history for libwww-perl +6.40 2019-10-24 12:55:45Z + - Let Digest authentication act on nonce expiry (GH#313) (Frank Maas) + - Make file arg for mirror mandatory #304 (GH#326) (Julien Fiegehenn) + - Doc fix: fields starting with ":" have to be quoted (GH#324) (Slaven + Rezić) + - Fix documentation for removing all handlers (GH#319) (leedo) + - Ensure proper version of Dist::Zilla::Plugin::MakeMaker::Awesome + - Add TravisCI testing for Perl v5.30 + - Clean up .perltidyrc + 6.39 2019-05-06 14:18:39Z - Document current best practices (GH#314) (Olaf Alders) - Document order in which handlers fire (GH#315) (Olaf Alders) diff --git a/META.json b/META.json index ed68c82..99b6d46 100644 --- a/META.json +++ b/META.json @@ -40,6 +40,7 @@ "IPC::Open3" : "0", "Pod::Coverage::TrustPod" : "0", "Test::EOL" : "0", + "Test::LeakTrace" : "0.16", "Test::MinimumVersion" : "0", "Test::Mojibake" : "0", "Test::More" : "0.94", @@ -108,96 +109,96 @@ "provides" : { "LWP" : { "file" : "lib/LWP.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::Authen::Basic" : { "file" : "lib/LWP/Authen/Basic.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::Authen::Digest" : { "file" : "lib/LWP/Authen/Digest.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::Authen::Ntlm" : { "file" : "lib/LWP/Authen/Ntlm.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::ConnCache" : { "file" : "lib/LWP/ConnCache.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::Debug" : { "file" : "lib/LWP/Debug.pm", - "version" : "6.39", + "version" : "6.40", "x_deprecated" : 1 }, "LWP::Debug::TraceHTTP" : { "file" : "lib/LWP/Debug/TraceHTTP.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::DebugFile" : { "file" : "lib/LWP/DebugFile.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::MemberMixin" : { "file" : "lib/LWP/MemberMixin.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::Protocol" : { "file" : "lib/LWP/Protocol.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::Protocol::cpan" : { "file" : "lib/LWP/Protocol/cpan.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::Protocol::data" : { "file" : "lib/LWP/Protocol/data.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::Protocol::file" : { "file" : "lib/LWP/Protocol/file.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::Protocol::ftp" : { "file" : "lib/LWP/Protocol/ftp.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::Protocol::gopher" : { "file" : "lib/LWP/Protocol/gopher.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::Protocol::http" : { "file" : "lib/LWP/Protocol/http.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::Protocol::loopback" : { "file" : "lib/LWP/Protocol/loopback.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::Protocol::mailto" : { "file" : "lib/LWP/Protocol/mailto.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::Protocol::nntp" : { "file" : "lib/LWP/Protocol/nntp.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::Protocol::nogo" : { "file" : "lib/LWP/Protocol/nogo.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::RobotUA" : { "file" : "lib/LWP/RobotUA.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::Simple" : { "file" : "lib/LWP/Simple.pm", - "version" : "6.39" + "version" : "6.40" }, "LWP::UserAgent" : { "file" : "lib/LWP/UserAgent.pm", - "version" : "6.39" + "version" : "6.40" } }, "release_status" : "stable", @@ -214,10 +215,10 @@ "x_IRC" : "irc://irc.perl.org/#lwp", "x_MailingList" : "mailto:libwww@perl.org" }, - "version" : "6.39", + "version" : "6.40", "x_Dist_Zilla" : { "perl" : { - "version" : "5.026001" + "version" : "5.030000" }, "plugins" : [ { @@ -268,8 +269,8 @@ "meta_noindex" : 1 }, "Dist::Zilla::Role::ModuleMetadata" : { - "Module::Metadata" : "1.000033", - "version" : "0.004" + "Module::Metadata" : "1.000036", + "version" : "0.006" } }, "name" : "MetaProvides::Package", @@ -312,7 +313,7 @@ "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { - "git_version" : "2.21.0", + "git_version" : "2.23.0", "include_authors" : 0, "include_releaser" : 1, "order_by" : "name", @@ -346,8 +347,8 @@ "class" : "Dist::Zilla::Plugin::InstallGuide", "config" : { "Dist::Zilla::Role::ModuleMetadata" : { - "Module::Metadata" : "1.000033", - "version" : "0.004" + "Module::Metadata" : "1.000036", + "version" : "0.006" } }, "name" : "InstallGuide", @@ -367,12 +368,12 @@ "class" : "Dist::Zilla::Plugin::DynamicPrereqs", "config" : { "Dist::Zilla::Role::ModuleMetadata" : { - "Module::Metadata" : "1.000033", - "version" : "0.004" + "Module::Metadata" : "1.000036", + "version" : "0.006" } }, "name" : "DynamicPrereqs", - "version" : "0.034" + "version" : "0.035" }, { "class" : "Dist::Zilla::Plugin::MakeMaker::Awesome", @@ -387,7 +388,7 @@ } }, "name" : "MakeMaker::Awesome", - "version" : "0.47" + "version" : "0.48" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", @@ -470,8 +471,13 @@ }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", + "config" : { + "Dist::Zilla::Plugin::Test::MinimumVersion" : { + "max_target_perl" : null + } + }, "name" : "Test::MinimumVersion", - "version" : "2.000008" + "version" : "2.000010" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", @@ -627,7 +633,7 @@ "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { - "git_version" : "2.21.0", + "git_version" : "2.23.0", "repo_root" : "." } }, @@ -757,7 +763,7 @@ "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { - "git_version" : "2.21.0", + "git_version" : "2.23.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { @@ -774,12 +780,12 @@ "branch" : null, "changelog" : "Changes", "signed" : 0, - "tag" : "v6.39", + "tag" : "v6.40", "tag_format" : "v%V", "tag_message" : "v%V" }, "Dist::Zilla::Role::Git::Repo" : { - "git_version" : "2.21.0", + "git_version" : "2.23.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { @@ -829,7 +835,7 @@ "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { - "git_version" : "2.21.0", + "git_version" : "2.23.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { @@ -849,7 +855,7 @@ "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { - "git_version" : "2.21.0", + "git_version" : "2.23.0", "repo_root" : "." } }, @@ -971,8 +977,10 @@ "Joe Atzberger ", "john9art ", "John Wittkoski ", + "Julien Fiegehenn ", "Karen Etheridge ", "Katarina Durechova ", + "leedo ", "Mark Stosberg ", "Martin H. Sluka ", "Matthew Horsfall ", @@ -998,7 +1006,6 @@ "Sean M. Burke ", "Sergey Romanov ", "Shoichi Kaji ", - "simbabque ", "Slaven Rezic ", "Spiros Denaxas ", "Steffen Ullrich ", @@ -1020,7 +1027,7 @@ "Yury Zavarin ", "Zefram " ], - "x_generated_by_perl" : "v5.26.1", - "x_serialization_backend" : "Cpanel::JSON::XS version 4.04" + "x_generated_by_perl" : "v5.30.0", + "x_serialization_backend" : "Cpanel::JSON::XS version 4.14" } diff --git a/META.yml b/META.yml index 0173f02..1b1856c 100644 --- a/META.yml +++ b/META.yml @@ -30,74 +30,74 @@ no_index: provides: LWP: file: lib/LWP.pm - version: '6.39' + version: '6.40' LWP::Authen::Basic: file: lib/LWP/Authen/Basic.pm - version: '6.39' + version: '6.40' LWP::Authen::Digest: file: lib/LWP/Authen/Digest.pm - version: '6.39' + version: '6.40' LWP::Authen::Ntlm: file: lib/LWP/Authen/Ntlm.pm - version: '6.39' + version: '6.40' LWP::ConnCache: file: lib/LWP/ConnCache.pm - version: '6.39' + version: '6.40' LWP::Debug: file: lib/LWP/Debug.pm - version: '6.39' + version: '6.40' x_deprecated: 1 LWP::Debug::TraceHTTP: file: lib/LWP/Debug/TraceHTTP.pm - version: '6.39' + version: '6.40' LWP::DebugFile: file: lib/LWP/DebugFile.pm - version: '6.39' + version: '6.40' LWP::MemberMixin: file: lib/LWP/MemberMixin.pm - version: '6.39' + version: '6.40' LWP::Protocol: file: lib/LWP/Protocol.pm - version: '6.39' + version: '6.40' LWP::Protocol::cpan: file: lib/LWP/Protocol/cpan.pm - version: '6.39' + version: '6.40' LWP::Protocol::data: file: lib/LWP/Protocol/data.pm - version: '6.39' + version: '6.40' LWP::Protocol::file: file: lib/LWP/Protocol/file.pm - version: '6.39' + version: '6.40' LWP::Protocol::ftp: file: lib/LWP/Protocol/ftp.pm - version: '6.39' + version: '6.40' LWP::Protocol::gopher: file: lib/LWP/Protocol/gopher.pm - version: '6.39' + version: '6.40' LWP::Protocol::http: file: lib/LWP/Protocol/http.pm - version: '6.39' + version: '6.40' LWP::Protocol::loopback: file: lib/LWP/Protocol/loopback.pm - version: '6.39' + version: '6.40' LWP::Protocol::mailto: file: lib/LWP/Protocol/mailto.pm - version: '6.39' + version: '6.40' LWP::Protocol::nntp: file: lib/LWP/Protocol/nntp.pm - version: '6.39' + version: '6.40' LWP::Protocol::nogo: file: lib/LWP/Protocol/nogo.pm - version: '6.39' + version: '6.40' LWP::RobotUA: file: lib/LWP/RobotUA.pm - version: '6.39' + version: '6.40' LWP::Simple: file: lib/LWP/Simple.pm - version: '6.39' + version: '6.40' LWP::UserAgent: file: lib/LWP/UserAgent.pm - version: '6.39' + version: '6.40' requires: Digest::MD5: '0' Encode: '2.12' @@ -134,10 +134,10 @@ resources: bugtracker: https://github.com/libwww-perl/libwww-perl/issues homepage: https://github.com/libwww-perl/libwww-perl repository: https://github.com/libwww-perl/libwww-perl.git -version: '6.39' +version: '6.40' x_Dist_Zilla: perl: - version: '5.026001' + version: '5.030000' plugins: - class: Dist::Zilla::Plugin::Git::GatherDir @@ -177,8 +177,8 @@ x_Dist_Zilla: inherit_version: '1' meta_noindex: '1' Dist::Zilla::Role::ModuleMetadata: - Module::Metadata: '1.000033' - version: '0.004' + Module::Metadata: '1.000036' + version: '0.006' name: MetaProvides::Package version: '2.004003' - @@ -210,7 +210,7 @@ x_Dist_Zilla: class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: - git_version: 2.21.0 + git_version: 2.23.0 include_authors: 0 include_releaser: 1 order_by: name @@ -237,8 +237,8 @@ x_Dist_Zilla: class: Dist::Zilla::Plugin::InstallGuide config: Dist::Zilla::Role::ModuleMetadata: - Module::Metadata: '1.000033' - version: '0.004' + Module::Metadata: '1.000036' + version: '0.006' name: InstallGuide version: '1.200013' - @@ -253,10 +253,10 @@ x_Dist_Zilla: class: Dist::Zilla::Plugin::DynamicPrereqs config: Dist::Zilla::Role::ModuleMetadata: - Module::Metadata: '1.000033' - version: '0.004' + Module::Metadata: '1.000036' + version: '0.006' name: DynamicPrereqs - version: '0.034' + version: '0.035' - class: Dist::Zilla::Plugin::MakeMaker::Awesome config: @@ -267,7 +267,7 @@ x_Dist_Zilla: default_jobs: 1 version: '6.012' name: MakeMaker::Awesome - version: '0.47' + version: '0.48' - class: Dist::Zilla::Plugin::MojibakeTests name: MojibakeTests @@ -331,8 +331,11 @@ x_Dist_Zilla: version: '0.006' - class: Dist::Zilla::Plugin::Test::MinimumVersion + config: + Dist::Zilla::Plugin::Test::MinimumVersion: + max_target_perl: ~ name: Test::MinimumVersion - version: '2.000008' + version: '2.000010' - class: Dist::Zilla::Plugin::PodSyntaxTests name: PodSyntaxTests @@ -478,7 +481,7 @@ x_Dist_Zilla: allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: - git_version: 2.21.0 + git_version: 2.23.0 repo_root: . name: Git::Check version: '2.046' @@ -575,7 +578,7 @@ x_Dist_Zilla: allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: - git_version: 2.21.0 + git_version: 2.23.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local @@ -588,11 +591,11 @@ x_Dist_Zilla: branch: ~ changelog: Changes signed: 0 - tag: v6.39 + tag: v6.40 tag_format: v%V tag_message: v%V Dist::Zilla::Role::Git::Repo: - git_version: 2.21.0 + git_version: 2.23.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local @@ -629,7 +632,7 @@ x_Dist_Zilla: - (?^:^lib/.*\.pm$) changelog: Changes Dist::Zilla::Role::Git::Repo: - git_version: 2.21.0 + git_version: 2.23.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local @@ -643,7 +646,7 @@ x_Dist_Zilla: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: - git_version: 2.21.0 + git_version: 2.23.0 repo_root: . name: Git::Push version: '2.046' @@ -746,8 +749,10 @@ x_contributors: - 'Joe Atzberger ' - 'john9art ' - 'John Wittkoski ' + - 'Julien Fiegehenn ' - 'Karen Etheridge ' - 'Katarina Durechova ' + - 'leedo ' - 'Mark Stosberg ' - 'Martin H. Sluka ' - 'Matthew Horsfall ' @@ -773,7 +778,6 @@ x_contributors: - 'Sean M. Burke ' - 'Sergey Romanov ' - 'Shoichi Kaji ' - - 'simbabque ' - 'Slaven Rezic ' - 'Spiros Denaxas ' - 'Steffen Ullrich ' @@ -794,5 +798,5 @@ x_contributors: - 'Yuri Karaban ' - 'Yury Zavarin ' - 'Zefram ' -x_generated_by_perl: v5.26.1 -x_serialization_backend: 'YAML::Tiny version 1.70' +x_generated_by_perl: v5.30.0 +x_serialization_backend: 'YAML::Tiny version 1.73' diff --git a/Makefile.PL b/Makefile.PL index 67b0ccf..82a2d6c 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,5 +1,5 @@ # This Makefile.PL for libwww-perl was generated by -# Dist::Zilla::Plugin::MakeMaker::Awesome 0.47. +# Dist::Zilla::Plugin::MakeMaker::Awesome 0.48. # Don't edit it but the dist.ini and plugins used to construct it. use strict; @@ -86,7 +86,7 @@ my %WriteMakefileArgs = ( "Test::Needs" => 0, "Test::RequiresInternet" => 0 }, - "VERSION" => "6.39", + "VERSION" => "6.40", "test" => { "TESTS" => "t/*.t t/base/*.t t/base/protocols/*.t t/leak/*.t t/local/*.t t/robot/*.t" } @@ -135,7 +135,7 @@ my %FallbackPrereqs = ( "warnings" => 0 ); -# inserted by Dist::Zilla::Plugin::DynamicPrereqs 0.034 +# inserted by Dist::Zilla::Plugin::DynamicPrereqs 0.035 requires('HTTP::Status', '6.18') if has_module('HTTP::Status', '6.17'); unless ( eval { ExtUtils::MakeMaker->VERSION('6.63_03') } ) { @@ -149,7 +149,7 @@ delete $WriteMakefileArgs{CONFIGURE_REQUIRES} WriteMakefile(%WriteMakefileArgs); -# inserted by Dist::Zilla::Plugin::DynamicPrereqs 0.034 +# inserted by Dist::Zilla::Plugin::DynamicPrereqs 0.035 sub _add_prereq { my ($mm_key, $module, $version_or_range) = @_; $version_or_range ||= 0; diff --git a/cpanfile b/cpanfile index a3c7903..3584ea0 100644 --- a/cpanfile +++ b/cpanfile @@ -51,4 +51,6 @@ on 'test' => sub { on 'develop' => sub { requires 'Authen::NTLM' => '1.02'; + requires 'Test::EOL' => '2.00', + requires 'Test::LeakTrace' => '0.16', }; diff --git a/dist.ini b/dist.ini index f52d2a2..8e58576 100644 --- a/dist.ini +++ b/dist.ini @@ -47,6 +47,7 @@ authority = cpan:LWWWP -body = requires('HTTP::Status', '6.18') if has_module('HTTP::Status', '6.17'); [MakeMaker::Awesome] +:version = 0.27 delimiter = | header = |use Getopt::Long qw(GetOptions); header = |GetOptions(\my %opt, diff --git a/lib/LWP.pm b/lib/LWP.pm index 47a8e20..298e8fb 100644 --- a/lib/LWP.pm +++ b/lib/LWP.pm @@ -1,6 +1,6 @@ package LWP; -our $VERSION = '6.39'; +our $VERSION = '6.40'; require LWP::UserAgent; # this should load everything you need diff --git a/lib/LWP/Authen/Basic.pm b/lib/LWP/Authen/Basic.pm index f24a3e5..ead5592 100644 --- a/lib/LWP/Authen/Basic.pm +++ b/lib/LWP/Authen/Basic.pm @@ -2,7 +2,7 @@ package LWP::Authen::Basic; use strict; -our $VERSION = '6.39'; +our $VERSION = '6.40'; require MIME::Base64; diff --git a/lib/LWP/Authen/Digest.pm b/lib/LWP/Authen/Digest.pm index 0376d15..2f7c24b 100644 --- a/lib/LWP/Authen/Digest.pm +++ b/lib/LWP/Authen/Digest.pm @@ -3,7 +3,7 @@ package LWP::Authen::Digest; use strict; use base 'LWP::Authen::Basic'; -our $VERSION = '6.39'; +our $VERSION = '6.40'; require Digest::MD5; diff --git a/lib/LWP/Authen/Ntlm.pm b/lib/LWP/Authen/Ntlm.pm index 0808e76..afdb787 100644 --- a/lib/LWP/Authen/Ntlm.pm +++ b/lib/LWP/Authen/Ntlm.pm @@ -2,7 +2,7 @@ package LWP::Authen::Ntlm; use strict; -our $VERSION = '6.39'; +our $VERSION = '6.40'; use Authen::NTLM "1.02"; use MIME::Base64 "2.12"; diff --git a/lib/LWP/ConnCache.pm b/lib/LWP/ConnCache.pm index 63e7088..3c34a8e 100644 --- a/lib/LWP/ConnCache.pm +++ b/lib/LWP/ConnCache.pm @@ -2,7 +2,7 @@ package LWP::ConnCache; use strict; -our $VERSION = '6.39'; +our $VERSION = '6.40'; our $DEBUG; sub new { diff --git a/lib/LWP/Debug.pm b/lib/LWP/Debug.pm index ddf7fc1..49befb5 100644 --- a/lib/LWP/Debug.pm +++ b/lib/LWP/Debug.pm @@ -1,6 +1,6 @@ package LWP::Debug; # legacy -our $VERSION = '6.39'; +our $VERSION = '6.40'; require Exporter; our @ISA = qw(Exporter); diff --git a/lib/LWP/Debug/TraceHTTP.pm b/lib/LWP/Debug/TraceHTTP.pm index 1b1ffca..5c9caa4 100644 --- a/lib/LWP/Debug/TraceHTTP.pm +++ b/lib/LWP/Debug/TraceHTTP.pm @@ -11,7 +11,7 @@ package LWP::Debug::TraceHTTP; use strict; use base 'LWP::Protocol::http'; -our $VERSION = '6.39'; +our $VERSION = '6.40'; package # hide from PAUSE LWP::Debug::TraceHTTP::Socket; diff --git a/lib/LWP/DebugFile.pm b/lib/LWP/DebugFile.pm index d5762f6..5d92179 100644 --- a/lib/LWP/DebugFile.pm +++ b/lib/LWP/DebugFile.pm @@ -1,6 +1,6 @@ package LWP::DebugFile; -our $VERSION = '6.39'; +our $VERSION = '6.40'; # legacy stub diff --git a/lib/LWP/MemberMixin.pm b/lib/LWP/MemberMixin.pm index 965b94f..c50fb45 100644 --- a/lib/LWP/MemberMixin.pm +++ b/lib/LWP/MemberMixin.pm @@ -1,6 +1,6 @@ package LWP::MemberMixin; -our $VERSION = '6.39'; +our $VERSION = '6.40'; sub _elem { my $self = shift; diff --git a/lib/LWP/Protocol.pm b/lib/LWP/Protocol.pm index dff69ac..a411125 100644 --- a/lib/LWP/Protocol.pm +++ b/lib/LWP/Protocol.pm @@ -2,7 +2,7 @@ package LWP::Protocol; use base 'LWP::MemberMixin'; -our $VERSION = '6.39'; +our $VERSION = '6.40'; use strict; use Carp (); diff --git a/lib/LWP/Protocol/cpan.pm b/lib/LWP/Protocol/cpan.pm index 12e2ce9..2583ceb 100644 --- a/lib/LWP/Protocol/cpan.pm +++ b/lib/LWP/Protocol/cpan.pm @@ -4,7 +4,7 @@ use strict; use base qw(LWP::Protocol); -our $VERSION = '6.39'; +our $VERSION = '6.40'; require URI; require HTTP::Status; diff --git a/lib/LWP/Protocol/data.pm b/lib/LWP/Protocol/data.pm index 186cea0..3160ff6 100644 --- a/lib/LWP/Protocol/data.pm +++ b/lib/LWP/Protocol/data.pm @@ -4,7 +4,7 @@ package LWP::Protocol::data; use strict; -our $VERSION = '6.39'; +our $VERSION = '6.40'; require HTTP::Response; require HTTP::Status; diff --git a/lib/LWP/Protocol/file.pm b/lib/LWP/Protocol/file.pm index 18a11ed..a6740c6 100644 --- a/lib/LWP/Protocol/file.pm +++ b/lib/LWP/Protocol/file.pm @@ -4,7 +4,7 @@ use base qw(LWP::Protocol); use strict; -our $VERSION = '6.39'; +our $VERSION = '6.40'; require LWP::MediaTypes; require HTTP::Request; diff --git a/lib/LWP/Protocol/ftp.pm b/lib/LWP/Protocol/ftp.pm index 9bd705a..231a9b4 100644 --- a/lib/LWP/Protocol/ftp.pm +++ b/lib/LWP/Protocol/ftp.pm @@ -5,7 +5,7 @@ package LWP::Protocol::ftp; use base qw(LWP::Protocol); use strict; -our $VERSION = '6.39'; +our $VERSION = '6.40'; use Carp (); use HTTP::Status (); diff --git a/lib/LWP/Protocol/gopher.pm b/lib/LWP/Protocol/gopher.pm index a89ad28..7f7f59f 100644 --- a/lib/LWP/Protocol/gopher.pm +++ b/lib/LWP/Protocol/gopher.pm @@ -9,7 +9,7 @@ package LWP::Protocol::gopher; use strict; -our $VERSION = '6.39'; +our $VERSION = '6.40'; require HTTP::Response; require HTTP::Status; diff --git a/lib/LWP/Protocol/http.pm b/lib/LWP/Protocol/http.pm index 9aaf198..aa51f79 100644 --- a/lib/LWP/Protocol/http.pm +++ b/lib/LWP/Protocol/http.pm @@ -2,7 +2,7 @@ package LWP::Protocol::http; use strict; -our $VERSION = '6.39'; +our $VERSION = '6.40'; require HTTP::Response; require HTTP::Status; diff --git a/lib/LWP/Protocol/loopback.pm b/lib/LWP/Protocol/loopback.pm index d50fa53..f742d20 100644 --- a/lib/LWP/Protocol/loopback.pm +++ b/lib/LWP/Protocol/loopback.pm @@ -2,7 +2,7 @@ package LWP::Protocol::loopback; use strict; -our $VERSION = '6.39'; +our $VERSION = '6.40'; require HTTP::Response; diff --git a/lib/LWP/Protocol/mailto.pm b/lib/LWP/Protocol/mailto.pm index 6e205ec..b842bea 100644 --- a/lib/LWP/Protocol/mailto.pm +++ b/lib/LWP/Protocol/mailto.pm @@ -11,7 +11,7 @@ require HTTP::Status; use Carp; use strict; -our $VERSION = '6.39'; +our $VERSION = '6.40'; use base qw(LWP::Protocol); our $SENDMAIL; diff --git a/lib/LWP/Protocol/nntp.pm b/lib/LWP/Protocol/nntp.pm index e69330f..70384b8 100644 --- a/lib/LWP/Protocol/nntp.pm +++ b/lib/LWP/Protocol/nntp.pm @@ -4,7 +4,7 @@ package LWP::Protocol::nntp; use base qw(LWP::Protocol); -our $VERSION = '6.39'; +our $VERSION = '6.40'; require HTTP::Response; require HTTP::Status; diff --git a/lib/LWP/Protocol/nogo.pm b/lib/LWP/Protocol/nogo.pm index a362fae..f07aa82 100644 --- a/lib/LWP/Protocol/nogo.pm +++ b/lib/LWP/Protocol/nogo.pm @@ -7,7 +7,7 @@ package LWP::Protocol::nogo; use strict; -our $VERSION = '6.39'; +our $VERSION = '6.40'; require HTTP::Response; require HTTP::Status; diff --git a/lib/LWP/RobotUA.pm b/lib/LWP/RobotUA.pm index c2b4651..3bfef47 100644 --- a/lib/LWP/RobotUA.pm +++ b/lib/LWP/RobotUA.pm @@ -2,7 +2,7 @@ package LWP::RobotUA; use base qw(LWP::UserAgent); -our $VERSION = '6.39'; +our $VERSION = '6.40'; require WWW::RobotRules; require HTTP::Request; diff --git a/lib/LWP/Simple.pm b/lib/LWP/Simple.pm index 75cb7d0..e2968e7 100644 --- a/lib/LWP/Simple.pm +++ b/lib/LWP/Simple.pm @@ -2,7 +2,7 @@ package LWP::Simple; use strict; -our $VERSION = '6.39'; +our $VERSION = '6.40'; require Exporter; diff --git a/lib/LWP/UserAgent.pm b/lib/LWP/UserAgent.pm index 3690bd5..c209de9 100644 --- a/lib/LWP/UserAgent.pm +++ b/lib/LWP/UserAgent.pm @@ -15,7 +15,7 @@ use LWP::Protocol (); use Scalar::Util qw(blessed); use Try::Tiny qw(try catch); -our $VERSION = '6.39'; +our $VERSION = '6.40'; sub new { @@ -966,6 +966,8 @@ sub mirror { my($self, $url, $file) = @_; + die "Local file name is missing" unless $file; + my $request = HTTP::Request->new('GET', $url); # If the file exists, add a cache-related header @@ -979,10 +981,10 @@ sub mirror my $response = $self->request($request, $tmpfile); if ( $response->header('X-Died') ) { - die $response->header('X-Died'); + die $response->header('X-Died'); } - # Only fetching a fresh copy of the would be considered success. + # Only fetching a fresh copy of the file would be considered success. # If the file was not modified, "304" would returned, which # is considered by HTTP::Status to be a "redirect", /not/ "success" if ( $response->is_success ) { @@ -1017,7 +1019,7 @@ sub mirror } # The local copy is fresh enough, so just delete the temp file else { - unlink($tmpfile); + unlink($tmpfile); } return $response; } @@ -1732,7 +1734,7 @@ the given processing phase. $ua->remove_handler( undef, %matchspec ); $ua->remove_handler( $phase, %matchspec ); - $ua->remove_handlers(); # REMOVE ALL HANDLERS IN ALL PHASES + $ua->remove_handler(); # REMOVE ALL HANDLERS IN ALL PHASES Remove handlers that match the given C<%matchspec>. If C<$phase> is not provided, remove handlers from all phases. @@ -1796,9 +1798,9 @@ Fields names that start with ":" are special. These will not initialize headers of the request but will determine how the response content is treated. The following special field names are recognized: - :content_file => $filename - :content_cb => \&callback - :read_size_hint => $bytes + ':content_file' => $filename + ':content_cb' => \&callback + ':read_size_hint' => $bytes If a $filename is provided with the C<:content_file> option, then the response content will be saved here instead of in the response diff --git a/t/00-report-prereqs.dd b/t/00-report-prereqs.dd index fa59361..3318bd3 100644 --- a/t/00-report-prereqs.dd +++ b/t/00-report-prereqs.dd @@ -19,6 +19,7 @@ do { my $x = { 'IPC::Open3' => '0', 'Pod::Coverage::TrustPod' => '0', 'Test::EOL' => '0', + 'Test::LeakTrace' => '0.16', 'Test::MinimumVersion' => '0', 'Test::Mojibake' => '0', 'Test::More' => '0.94', diff --git a/t/local/http.t b/t/local/http.t index 9046a72..c4779c4 100644 --- a/t/local/http.t +++ b/t/local/http.t @@ -1,6 +1,7 @@ use strict; use warnings; use Test::More; +use Test::Fatal; use Config; use FindBin qw($Bin); @@ -62,7 +63,7 @@ sub _test { return plan skip_all => 'We could not talk to our daemon' unless $DAEMON; return plan skip_all => 'No base URI' unless $base; - plan tests => 90; + plan tests => 94; my $ua = LWP::UserAgent->new; $ua->agent("Mozilla/0.01 " . $ua->agent); @@ -288,6 +289,16 @@ sub _test { ok($res->is_success, 'post: is_success'); ok($res->content =~ /^Content-Type: multipart\/form-data; boundary=/m, 'post: multipart good'); } + { # mirror + ok(exception { $ua->mirror(url("/echo/foo", $base)) }, 'mirror: filename required'); + my $copy = "lwp-base-test-$$"; # downloaded copy + my $res = $ua->mirror(url("/echo/foo", $base), $copy); + isa_ok($res, 'HTTP::Response', 'mirror: good response object'); + ok($res->is_success, 'mirror: is_success'); + + ok(-s $copy, 'mirror: file exists and is not empty'); + unlink($copy); + } { # partial my $req = HTTP::Request->new( GET => url("/partial", $base) ); my $res = $ua->request($req); diff --git a/xt/author/live/jigsaw/auth-d.t b/xt/author/live/jigsaw/auth-d.t index 7d03f21..ce5224e 100644 --- a/xt/author/live/jigsaw/auth-d.t +++ b/xt/author/live/jigsaw/auth-d.t @@ -6,9 +6,8 @@ use Test::RequiresInternet ('jigsaw.w3.org' => 80); use HTTP::Request; use LWP::UserAgent; -plan tests => 3; - { + package MyUA; use base 'LWP::UserAgent'; @@ -21,11 +20,18 @@ plan tests => 3; } } -my $ua = MyUA->new(keep_alive => 1); +SKIP: { + skip 'LIVE_JIGSAW_TESTS not enabled', 3 if $ENV{NO_JIGSAW}; + + my $ua = MyUA->new(keep_alive => 1); -my $req = HTTP::Request->new(GET => "http://jigsaw.w3.org/HTTP/Digest/"); -my $res = $ua->request($req); -isa_ok($res, 'HTTP::Response', 'request: Got a proper response'); + my $req = HTTP::Request->new(GET => "http://jigsaw.w3.org/HTTP/Digest/"); + my $res = $ua->request($req); + + isa_ok($res, 'HTTP::Response', 'request: Got a proper response'); + + like($res->content, qr/Your browser made it!/, 'Proper response content'); + is($res->header("Client-Response-Num"), 5, 'Client-Response-Num is 5'); +} -like($res->content, qr/Your browser made it!/, 'Proper response content'); -is($res->header("Client-Response-Num"), 5, 'Client-Response-Num is 5'); +done_testing(); diff --git a/xt/author/minimum-version.t b/xt/author/minimum-version.t index 6af92e0..bed9e18 100644 --- a/xt/author/minimum-version.t +++ b/xt/author/minimum-version.t @@ -1,6 +1,6 @@ -#!perl +use strict; +use warnings; use Test::More; - use Test::MinimumVersion; all_minimum_version_from_metayml_ok(); diff --git a/xt/author/pod-spell.t b/xt/author/pod-spell.t index b4eed04..ae32c43 100644 --- a/xt/author/pod-spell.t +++ b/xt/author/pod-spell.t @@ -73,6 +73,7 @@ FWILES Fabian Father Fesler +Fiegehenn Finch Froehlich Gavin @@ -115,6 +116,7 @@ Joe Joerg John Jr +Julien KONISHI Kaji Kaminsky @@ -335,6 +337,7 @@ jwilk jwittkoski ka katarina +leedo lib loopback lwp diff --git a/xt/release/changes_has_content.t b/xt/release/changes_has_content.t index c0586ee..2130150 100644 --- a/xt/release/changes_has_content.t +++ b/xt/release/changes_has_content.t @@ -8,7 +8,7 @@ if (($ENV{TRAVIS_PULL_REQUEST} || '') eq 'false') { note 'Checking Changes'; my $changes_file = 'Changes'; -my $newver = '6.39'; +my $newver = '6.40'; my $trial_token = '-TRIAL'; my $encoding = 'UTF-8';