Change history for libwww-perl
+6.61 2022-01-21 21:41:18Z
+ - Use File::Copy::move to attempt an atomic mirror (GH#401) (Andrew Fresh)
+ - Require Getopt::Long at runtime, too (GH#402) (Ville Skyttä)
+
6.60 2021-12-17 22:29:57Z
+ - Mirror temporary file handling fixes (GH#393) (Ville Skyttä)
- Warn if updating modification time of mirrored file fails (GH#399) (Ville Skyttä)
6.59 2021-12-02 21:16:04Z
"Digest::MD5" : "0",
"Encode" : "2.12",
"Encode::Locale" : "0",
+ "File::Copy" : "0",
"File::Listing" : "6",
+ "File::Temp" : "0",
+ "Getopt::Long" : "0",
"HTML::Entities" : "0",
"HTML::HeadParser" : "0",
"HTTP::Cookies" : "6",
"provides" : {
"LWP" : {
"file" : "lib/LWP.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::Authen::Basic" : {
"file" : "lib/LWP/Authen/Basic.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::Authen::Digest" : {
"file" : "lib/LWP/Authen/Digest.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::Authen::Ntlm" : {
"file" : "lib/LWP/Authen/Ntlm.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::ConnCache" : {
"file" : "lib/LWP/ConnCache.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::Debug" : {
"file" : "lib/LWP/Debug.pm",
- "version" : "6.60",
+ "version" : "6.61",
"x_deprecated" : 1
},
"LWP::Debug::TraceHTTP" : {
"file" : "lib/LWP/Debug/TraceHTTP.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::DebugFile" : {
"file" : "lib/LWP/DebugFile.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::MemberMixin" : {
"file" : "lib/LWP/MemberMixin.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::Protocol" : {
"file" : "lib/LWP/Protocol.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::Protocol::cpan" : {
"file" : "lib/LWP/Protocol/cpan.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::Protocol::data" : {
"file" : "lib/LWP/Protocol/data.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::Protocol::file" : {
"file" : "lib/LWP/Protocol/file.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::Protocol::ftp" : {
"file" : "lib/LWP/Protocol/ftp.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::Protocol::gopher" : {
"file" : "lib/LWP/Protocol/gopher.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::Protocol::http" : {
"file" : "lib/LWP/Protocol/http.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::Protocol::loopback" : {
"file" : "lib/LWP/Protocol/loopback.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::Protocol::mailto" : {
"file" : "lib/LWP/Protocol/mailto.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::Protocol::nntp" : {
"file" : "lib/LWP/Protocol/nntp.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::Protocol::nogo" : {
"file" : "lib/LWP/Protocol/nogo.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::RobotUA" : {
"file" : "lib/LWP/RobotUA.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::Simple" : {
"file" : "lib/LWP/Simple.pm",
- "version" : "6.60"
+ "version" : "6.61"
},
"LWP::UserAgent" : {
"file" : "lib/LWP/UserAgent.pm",
- "version" : "6.60"
+ "version" : "6.61"
}
},
"release_status" : "stable",
"x_IRC" : "irc://irc.perl.org/#lwp",
"x_MailingList" : "mailto:libwww@perl.org"
},
- "version" : "6.60",
+ "version" : "6.61",
"x_Dist_Zilla" : {
"perl" : {
"version" : "5.026001"
"branch" : null,
"changelog" : "Changes",
"signed" : 0,
- "tag" : "v6.60",
+ "tag" : "v6.61",
"tag_format" : "v%V",
"tag_message" : "v%V"
},
"amire80 <amir.aharoni@gmail.com>",
"Andreas J. Koenig <andreas.koenig@anima.de>",
"Andrew Grangaard <granny-github@ofb.net>",
+ "Andrew Hewus Fresh <andrew@afresh1.com>",
"Anirvan Chatterjee <anirvan@users.noreply.github.com>",
"Arne Johannessen <git@arne.johannessen.de>",
"BGMNT <freeerider@mailinator.com>",
provides:
LWP:
file: lib/LWP.pm
- version: '6.60'
+ version: '6.61'
LWP::Authen::Basic:
file: lib/LWP/Authen/Basic.pm
- version: '6.60'
+ version: '6.61'
LWP::Authen::Digest:
file: lib/LWP/Authen/Digest.pm
- version: '6.60'
+ version: '6.61'
LWP::Authen::Ntlm:
file: lib/LWP/Authen/Ntlm.pm
- version: '6.60'
+ version: '6.61'
LWP::ConnCache:
file: lib/LWP/ConnCache.pm
- version: '6.60'
+ version: '6.61'
LWP::Debug:
file: lib/LWP/Debug.pm
- version: '6.60'
+ version: '6.61'
x_deprecated: 1
LWP::Debug::TraceHTTP:
file: lib/LWP/Debug/TraceHTTP.pm
- version: '6.60'
+ version: '6.61'
LWP::DebugFile:
file: lib/LWP/DebugFile.pm
- version: '6.60'
+ version: '6.61'
LWP::MemberMixin:
file: lib/LWP/MemberMixin.pm
- version: '6.60'
+ version: '6.61'
LWP::Protocol:
file: lib/LWP/Protocol.pm
- version: '6.60'
+ version: '6.61'
LWP::Protocol::cpan:
file: lib/LWP/Protocol/cpan.pm
- version: '6.60'
+ version: '6.61'
LWP::Protocol::data:
file: lib/LWP/Protocol/data.pm
- version: '6.60'
+ version: '6.61'
LWP::Protocol::file:
file: lib/LWP/Protocol/file.pm
- version: '6.60'
+ version: '6.61'
LWP::Protocol::ftp:
file: lib/LWP/Protocol/ftp.pm
- version: '6.60'
+ version: '6.61'
LWP::Protocol::gopher:
file: lib/LWP/Protocol/gopher.pm
- version: '6.60'
+ version: '6.61'
LWP::Protocol::http:
file: lib/LWP/Protocol/http.pm
- version: '6.60'
+ version: '6.61'
LWP::Protocol::loopback:
file: lib/LWP/Protocol/loopback.pm
- version: '6.60'
+ version: '6.61'
LWP::Protocol::mailto:
file: lib/LWP/Protocol/mailto.pm
- version: '6.60'
+ version: '6.61'
LWP::Protocol::nntp:
file: lib/LWP/Protocol/nntp.pm
- version: '6.60'
+ version: '6.61'
LWP::Protocol::nogo:
file: lib/LWP/Protocol/nogo.pm
- version: '6.60'
+ version: '6.61'
LWP::RobotUA:
file: lib/LWP/RobotUA.pm
- version: '6.60'
+ version: '6.61'
LWP::Simple:
file: lib/LWP/Simple.pm
- version: '6.60'
+ version: '6.61'
LWP::UserAgent:
file: lib/LWP/UserAgent.pm
- version: '6.60'
+ version: '6.61'
requires:
Digest::MD5: '0'
Encode: '2.12'
Encode::Locale: '0'
+ File::Copy: '0'
File::Listing: '6'
+ File::Temp: '0'
+ Getopt::Long: '0'
HTML::Entities: '0'
HTML::HeadParser: '0'
HTTP::Cookies: '6'
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.60'
+version: '6.61'
x_Dist_Zilla:
perl:
version: '5.026001'
branch: ~
changelog: Changes
signed: 0
- tag: v6.60
+ tag: v6.61
tag_format: v%V
tag_message: v%V
Dist::Zilla::Role::Git::Repo:
- 'amire80 <amir.aharoni@gmail.com>'
- 'Andreas J. Koenig <andreas.koenig@anima.de>'
- 'Andrew Grangaard <granny-github@ofb.net>'
+ - 'Andrew Hewus Fresh <andrew@afresh1.com>'
- 'Anirvan Chatterjee <anirvan@users.noreply.github.com>'
- 'Arne Johannessen <git@arne.johannessen.de>'
- 'BGMNT <freeerider@mailinator.com>'
"Digest::MD5" => 0,
"Encode" => "2.12",
"Encode::Locale" => 0,
+ "File::Copy" => 0,
"File::Listing" => 6,
+ "File::Temp" => 0,
+ "Getopt::Long" => 0,
"HTML::Entities" => 0,
"HTML::HeadParser" => 0,
"HTTP::Cookies" => 6,
"Test::Needs" => 0,
"Test::RequiresInternet" => 0
},
- "VERSION" => "6.60",
+ "VERSION" => "6.61",
"test" => {
"TESTS" => "t/*.t t/base/*.t t/base/protocols/*.t t/leak/*.t t/local/*.t t/robot/*.t"
}
"Encode" => "2.12",
"Encode::Locale" => 0,
"ExtUtils::MakeMaker" => 0,
+ "File::Copy" => 0,
"File::Listing" => 6,
"File::Spec" => 0,
+ "File::Temp" => 0,
"FindBin" => 0,
+ "Getopt::Long" => 0,
"HTML::Entities" => 0,
"HTML::HeadParser" => 0,
"HTTP::Cookies" => 6,
requires 'Digest::MD5';
requires 'Encode' => '2.12';
requires 'Encode::Locale';
+ requires 'File::Copy';
requires 'File::Listing' => '6';
+ requires 'File::Temp';
+ requires 'Getopt::Long';
requires 'HTML::Entities';
requires 'HTML::HeadParser';
requires 'HTTP::Cookies' => '6';
package LWP;
-our $VERSION = '6.60';
+our $VERSION = '6.61';
require LWP::UserAgent; # this should load everything you need
use strict;
-our $VERSION = '6.60';
+our $VERSION = '6.61';
require Encode;
require MIME::Base64;
use strict;
use parent 'LWP::Authen::Basic';
-our $VERSION = '6.60';
+our $VERSION = '6.61';
require Digest::MD5;
use strict;
-our $VERSION = '6.60';
+our $VERSION = '6.61';
use Authen::NTLM "1.02";
use MIME::Base64 "2.12";
use strict;
-our $VERSION = '6.60';
+our $VERSION = '6.61';
our $DEBUG;
sub new {
package LWP::Debug; # legacy
-our $VERSION = '6.60';
+our $VERSION = '6.61';
require Exporter;
our @ISA = qw(Exporter);
use strict;
use parent 'LWP::Protocol::http';
-our $VERSION = '6.60';
+our $VERSION = '6.61';
package # hide from PAUSE
LWP::Debug::TraceHTTP::Socket;
package LWP::DebugFile;
-our $VERSION = '6.60';
+our $VERSION = '6.61';
# legacy stub
package LWP::MemberMixin;
-our $VERSION = '6.60';
+our $VERSION = '6.61';
sub _elem {
my $self = shift;
use parent 'LWP::MemberMixin';
-our $VERSION = '6.60';
+our $VERSION = '6.61';
use strict;
use Carp ();
use parent qw(LWP::Protocol);
-our $VERSION = '6.60';
+our $VERSION = '6.61';
require URI;
require HTTP::Status;
use strict;
-our $VERSION = '6.60';
+our $VERSION = '6.61';
require HTTP::Response;
require HTTP::Status;
use strict;
-our $VERSION = '6.60';
+our $VERSION = '6.61';
require LWP::MediaTypes;
require HTTP::Request;
use parent qw(LWP::Protocol);
use strict;
-our $VERSION = '6.60';
+our $VERSION = '6.61';
use Carp ();
use HTTP::Status ();
use strict;
-our $VERSION = '6.60';
+our $VERSION = '6.61';
require HTTP::Response;
require HTTP::Status;
use strict;
-our $VERSION = '6.60';
+our $VERSION = '6.61';
require HTTP::Response;
require HTTP::Status;
use strict;
-our $VERSION = '6.60';
+our $VERSION = '6.61';
require HTTP::Response;
use Carp;
use strict;
-our $VERSION = '6.60';
+our $VERSION = '6.61';
use parent qw(LWP::Protocol);
our $SENDMAIL;
use parent qw(LWP::Protocol);
-our $VERSION = '6.60';
+our $VERSION = '6.61';
require HTTP::Response;
require HTTP::Status;
use strict;
-our $VERSION = '6.60';
+our $VERSION = '6.61';
require HTTP::Response;
require HTTP::Status;
use parent qw(LWP::UserAgent);
-our $VERSION = '6.60';
+our $VERSION = '6.61';
require WWW::RobotRules;
require HTTP::Request;
use strict;
-our $VERSION = '6.60';
+our $VERSION = '6.61';
require Exporter;
use parent qw(LWP::MemberMixin);
use Carp ();
+use File::Copy ();
use HTTP::Request ();
use HTTP::Response ();
use HTTP::Date ();
use Scalar::Util qw(blessed);
use Try::Tiny qw(try catch);
-our $VERSION = '6.60';
+our $VERSION = '6.61';
sub new
{
$request->header( 'If-Modified-Since' => HTTP::Date::time2str($mtime) );
}
}
- my $tmpfile = "$file-$$";
+
+ require File::Temp;
+ my ($tmpfh, $tmpfile) = File::Temp::tempfile("$file-XXXXXX");
+ close($tmpfh) or die "Could not close tmpfile '$tmpfile': $!";
my $response = $self->request($request, $tmpfile);
if ( $response->header('X-Died') ) {
+ unlink($tmpfile);
die $response->header('X-Died');
}
# The file was the expected length.
else {
# Replace the stale file with a fresh copy
- if ( -e $file ) {
- # Some DOSish systems fail to rename if the target exists
- chmod 0777, $file;
- unlink $file;
- }
- rename( $tmpfile, $file )
+ # File::Copy will attempt to do it atomically,
+ # and fall back to a delete + copy if that fails.
+ File::Copy::move( $tmpfile, $file )
or die "Cannot rename '$tmpfile' to '$file': $!\n";
+ # Set standard file permissions if umask is supported.
+ # If not, leave what File::Temp created in effect.
+ if ( defined(my $umask = umask()) ) {
+ my $mode = 0666 &~ $umask;
+ chmod $mode, $file
+ or die sprintf("Cannot chmod %o '%s': %s\n", $mode, $file, $!);
+ }
+
# make sure the file has the same last modification time
if ( my $lm = $response->last_modified ) {
utime $lm, $lm, $file
will be downloaded again. The modification time of the file will be
forced to match that of the server.
+Uses L<File::Copy/move> to attempt to atomically replace the C<$filename>.
+
The return value is an L<HTTP::Response> object.
=head2 patch
'Digest::MD5' => '0',
'Encode' => '2.12',
'Encode::Locale' => '0',
+ 'File::Copy' => '0',
'File::Listing' => '6',
+ 'File::Temp' => '0',
+ 'Getopt::Long' => '0',
'HTML::Entities' => '0',
'HTML::HeadParser' => '0',
'HTTP::Cookies' => '6',
Finch
Fowler
Frank
+Fresh
Froehlich
Galeev
Galen
Harald
Hay
Hedlund
+Hewus
Hoblitt
Hoesel
Horsfall
amir
amire80
andreas
+andrew
anirvan
asjo
at
note 'Checking Changes';
my $changes_file = 'Changes';
-my $newver = '6.60';
+my $newver = '6.61';
my $trial_token = '-TRIAL';
my $encoding = 'UTF-8';