Imported Upstream version 6.61 upstream/6.61
authorDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 21 Jul 2022 02:28:28 +0000 (11:28 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 21 Jul 2022 02:28:28 +0000 (11:28 +0900)
31 files changed:
Changes
META.json
META.yml
Makefile.PL
cpanfile
lib/LWP.pm
lib/LWP/Authen/Basic.pm
lib/LWP/Authen/Digest.pm
lib/LWP/Authen/Ntlm.pm
lib/LWP/ConnCache.pm
lib/LWP/Debug.pm
lib/LWP/Debug/TraceHTTP.pm
lib/LWP/DebugFile.pm
lib/LWP/MemberMixin.pm
lib/LWP/Protocol.pm
lib/LWP/Protocol/cpan.pm
lib/LWP/Protocol/data.pm
lib/LWP/Protocol/file.pm
lib/LWP/Protocol/ftp.pm
lib/LWP/Protocol/gopher.pm
lib/LWP/Protocol/http.pm
lib/LWP/Protocol/loopback.pm
lib/LWP/Protocol/mailto.pm
lib/LWP/Protocol/nntp.pm
lib/LWP/Protocol/nogo.pm
lib/LWP/RobotUA.pm
lib/LWP/Simple.pm
lib/LWP/UserAgent.pm
t/00-report-prereqs.dd
xt/author/pod-spell.t
xt/release/changes_has_content.t

diff --git a/Changes b/Changes
index abbf672a341c1d2a04d4b6cc28d1d8797b1fade9..45d04a0ce637e21a2e632f8c82e1c7c22e1f56ed 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,11 @@
 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
index 74187c29dc4b4847a8951c6bb25e216b3226d2aa..263d20c1695cb84e194e51f2a4ca5f43ba9389c1 100644 (file)
--- a/META.json
+++ b/META.json
             "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>",
index 404e203482b02017b12cafd4f89f121deebd71ef..4e38602ff8c7cdc1200b1fbd8dffc95248e7b29d 100644 (file)
--- a/META.yml
+++ b/META.yml
@@ -31,79 +31,82 @@ no_index:
 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'
@@ -134,7 +137,7 @@ 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.60'
+version: '6.61'
 x_Dist_Zilla:
   perl:
     version: '5.026001'
@@ -588,7 +591,7 @@ x_Dist_Zilla:
           branch: ~
           changelog: Changes
           signed: 0
-          tag: v6.60
+          tag: v6.61
           tag_format: v%V
           tag_message: v%V
         Dist::Zilla::Role::Git::Repo:
@@ -709,6 +712,7 @@ x_contributors:
   - '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>'
index a0d8fb3c4eb5a923ca7bb15eb8029f3274e0aecf..02c12f35cb0ee680150e0b936da48d4deaf3378b 100644 (file)
@@ -51,7 +51,10 @@ my %WriteMakefileArgs = (
     "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,
@@ -86,7 +89,7 @@ my %WriteMakefileArgs = (
     "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"
   }
@@ -102,9 +105,12 @@ my %FallbackPrereqs = (
   "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,
index a41fadb94c6d606d7578c5d9c84519330e4c7928..25ce988ccfd2f1428d4f3d1978c7b1c2c5ace434 100644 (file)
--- a/cpanfile
+++ b/cpanfile
@@ -15,7 +15,10 @@ on 'runtime' => sub {
     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';
index fc739ee2fd94ff465d5f02f855d138bda44ef66a..1db7504a6ebd9dac37fc644a803b7d9e21dca737 100644 (file)
@@ -1,6 +1,6 @@
 package LWP;
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 require LWP::UserAgent;  # this should load everything you need
 
index b462559d6b38a67bc0cc406dfde8f4d36cb017aa..6af1441bddded19bc4a6525a789ad484dd3e6875 100644 (file)
@@ -2,7 +2,7 @@ package LWP::Authen::Basic;
 
 use strict;
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 require Encode;
 require MIME::Base64;
index 19bb6a60220b179b72d883f180e72fdce4224bb8..bb1d9ae3c8f7e3bb46a458a29a0705678deeda38 100644 (file)
@@ -3,7 +3,7 @@ package LWP::Authen::Digest;
 use strict;
 use parent 'LWP::Authen::Basic';
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 require Digest::MD5;
 
index 6ecfdf49251f309103eb00ad4d8bcca9fe38a9c8..de745af6acccbba064530ac0d892019279b29af6 100644 (file)
@@ -2,7 +2,7 @@ package LWP::Authen::Ntlm;
 
 use strict;
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 use Authen::NTLM "1.02";
 use MIME::Base64 "2.12";
index e4905d359e3be40da466a4955204aed2da1cb276..67dfff6f6c4debd64ef888a47530edb4882620dc 100644 (file)
@@ -2,7 +2,7 @@ package LWP::ConnCache;
 
 use strict;
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 our $DEBUG;
 
 sub new {
index 146e3639f7067e58ae05d6613d10e258eb321182..1e2ea15d534dcff3f8f8471bd37f046cecd5738b 100644 (file)
@@ -1,6 +1,6 @@
 package LWP::Debug;    # legacy
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 require Exporter;
 our @ISA       = qw(Exporter);
index 9d48d557e9b2f192874065132842395e5923d518..a6cd44cbeabb57a49300a1fe9a793880316a5b66 100644 (file)
@@ -11,7 +11,7 @@ package LWP::Debug::TraceHTTP;
 use strict;
 use parent 'LWP::Protocol::http';
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 package # hide from PAUSE
     LWP::Debug::TraceHTTP::Socket;
index 95543a55ee49ca480013479b171f31bcec11b82f..27f3dbb2280a1402b130081136581f168cd68791 100644 (file)
@@ -1,6 +1,6 @@
 package LWP::DebugFile;
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 # legacy stub
 
index 48c6c57fa1dfaa0cf1dbe9d1bc6bba1949384fd1..a5a9e7599badc46122e94ab33952387108b5b890 100644 (file)
@@ -1,6 +1,6 @@
 package LWP::MemberMixin;
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 sub _elem {
     my $self = shift;
index ef12a40f4283fec0ddd19f90bf3296f698cf4e40..1d656cf85080d31dab9d5ddafd5c8e27d39632e5 100644 (file)
@@ -2,7 +2,7 @@ package LWP::Protocol;
 
 use parent 'LWP::MemberMixin';
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 use strict;
 use Carp ();
index 716b357da8d9618f44c56ba58a0d4a0991cb7c29..90ced43d06af5d374ed5bcc029dab91b34be0ade 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 
 use parent qw(LWP::Protocol);
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 require URI;
 require HTTP::Status;
index 66310163a96f5c822145dc8bc1a375c8a5060297..a0461b5e418be6950ef9dcef6f31b3cf1cd5da43 100644 (file)
@@ -4,7 +4,7 @@ package LWP::Protocol::data;
 
 use strict;
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 require HTTP::Response;
 require HTTP::Status;
index ff1d4e751d5afb0e2889190eac98e15396ceac29..37be55d76fb0e5b3c573101dcbaa45b551214c21 100644 (file)
@@ -4,7 +4,7 @@ use parent qw(LWP::Protocol);
 
 use strict;
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 require LWP::MediaTypes;
 require HTTP::Request;
index 91b04fc12615025f6813e7976d501b443ddc636c..a82d527345ef281f39544897f623050c07eab2ab 100644 (file)
@@ -5,7 +5,7 @@ package LWP::Protocol::ftp;
 use parent qw(LWP::Protocol);
 use strict;
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 use Carp            ();
 use HTTP::Status    ();
index 88803baf77ea9cef04443b9e5bc0e8d06a378d2a..1b46df4a079cc6d788fe7e5be67889b7c096655f 100644 (file)
@@ -9,7 +9,7 @@ package LWP::Protocol::gopher;
 
 use strict;
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 require HTTP::Response;
 require HTTP::Status;
index d0c63537f203a196f944ab767ea8886baea729a9..88b4c60df35d2219aeabf1581dda9cb5f22234a3 100644 (file)
@@ -2,7 +2,7 @@ package LWP::Protocol::http;
 
 use strict;
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 require HTTP::Response;
 require HTTP::Status;
index 9e44cc39ca65c16a7f3b392cf1dc9cfd7090a15a..a1b095ea705e8d48ee223d30c0ca2fd8a2cf1064 100644 (file)
@@ -2,7 +2,7 @@ package LWP::Protocol::loopback;
 
 use strict;
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 require HTTP::Response;
 
index 17c38ffbd8663a8a715fa5797fe271f6bf44da05..29f934bb267553e5bb6acfceea5d60a9ca793fe7 100644 (file)
@@ -11,7 +11,7 @@ require HTTP::Status;
 use Carp;
 use strict;
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 use parent qw(LWP::Protocol);
 our $SENDMAIL;
index 3ba7e42cffecbe8b0fda8df0756f6ae7905e59e4..1042cd40c3143ec71195e063b39b960bb3af6dae 100644 (file)
@@ -4,7 +4,7 @@ package LWP::Protocol::nntp;
 
 use parent qw(LWP::Protocol);
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 require HTTP::Response;
 require HTTP::Status;
index 2a2f69d9aaf0dbc8ecdd9c686ef682a37130acb4..dcc54cfc7d115aa100a1bf5991dc2bdf636731b7 100644 (file)
@@ -7,7 +7,7 @@ package LWP::Protocol::nogo;
 
 use strict;
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 require HTTP::Response;
 require HTTP::Status;
index 17405d9d730f27b2c263e6a93657bff7ee1216d7..028bdef7af26ac4fdb149322ed0e9d86b7f609bc 100644 (file)
@@ -2,7 +2,7 @@ package LWP::RobotUA;
 
 use parent qw(LWP::UserAgent);
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 require WWW::RobotRules;
 require HTTP::Request;
index 5f2227cae8aadb2a7192e3eea71483620a63e6d5..d76d6afdfdbd8c307575295d625793ada547df7a 100644 (file)
@@ -2,7 +2,7 @@ package LWP::Simple;
 
 use strict;
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 require Exporter;
 
index 5a7bd3237ef47ab5b256f9d19183b9a7c12088c5..a521f165290339772eb03e871e326e692940ace2 100644 (file)
@@ -5,6 +5,7 @@ use strict;
 use parent qw(LWP::MemberMixin);
 
 use Carp ();
+use File::Copy ();
 use HTTP::Request ();
 use HTTP::Response ();
 use HTTP::Date ();
@@ -16,7 +17,7 @@ use LWP::Protocol ();
 use Scalar::Util qw(blessed);
 use Try::Tiny qw(try catch);
 
-our $VERSION = '6.60';
+our $VERSION = '6.61';
 
 sub new
 {
@@ -1005,10 +1006,14 @@ sub mirror
             $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');
     }
 
@@ -1031,14 +1036,19 @@ sub mirror
         # 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
@@ -1914,6 +1924,8 @@ this time, then nothing happens.  If the document has been updated, it
 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
index 538b53d4d17744f13360d689bb5ff9eaab708432..cf92342d8db9bb8ed685d236d2949c52d6dd3a2b 100644 (file)
@@ -35,7 +35,10 @@ do { my $x = {
                                       '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',
index 69d423e248b2e244e983b4cf015301319991c239..bc88130b768df1b61d6c05eed3863a92cd0c04cb 100644 (file)
@@ -79,6 +79,7 @@ Fesler
 Finch
 Fowler
 Frank
+Fresh
 Froehlich
 Galeev
 Galen
@@ -105,6 +106,7 @@ Hans
 Harald
 Hay
 Hedlund
+Hewus
 Hoblitt
 Hoesel
 Horsfall
@@ -307,6 +309,7 @@ akiym
 amir
 amire80
 andreas
+andrew
 anirvan
 asjo
 at
index c7c687a44e7d314efcb4e46a2170ad21d397613e..b05b502f2cf10912c89e9dfea034c779c2c5821d 100644 (file)
@@ -8,7 +8,7 @@ if (($ENV{TRAVIS_PULL_REQUEST} || '') eq 'false') {
 
 note 'Checking Changes';
 my $changes_file = 'Changes';
-my $newver = '6.60';
+my $newver = '6.61';
 my $trial_token = '-TRIAL';
 my $encoding = 'UTF-8';