Trivial patch for stow with Perl 5.20

Adam Sampson <[email protected]> Fri, 6 Jun 2014 21:02:44 +0100
Newsgroups gmane.comp.gnu.stow.bugs
Message-ID <[email protected]>
Hi Stow authors,

With Perl 5.20, installing a package with stow gives this warning:

Possible precedence issue with control flow operator at
/gar/packages/stow-2.2.0/lib/perl5/site_perl/5.20.0/Stow.pm line 1736.

Here's one possible fix (just matching the style of a similar check later
in the code):

diff -x config.log -x config.status -ru tmp/stow-2.2.0/lib/Stow.pm.in work/stow-2.2.0/lib/Stow.pm.in
--- tmp/stow-2.2.0/lib/Stow.pm.in	2012-02-18 20:33:34.000000000 +0000
+++ work/stow-2.2.0/lib/Stow.pm.in	2014-06-06 20:52:08.090000000 +0100
@@ -1732,8 +1732,8 @@
     }
     elsif (-l $path) {
         debug(4, "  read_a_link($path): real link");
-        return readlink $path
-            or error("Could not read link: $path");
+        my $target = readlink $path or error("Could not read link: $path");
+        return $target;
     }
     internal_error("read_a_link() passed a non link path: $path\n");
 }

Thanks very much,

-- 
Adam Sampson <[email protected]>                         <http://offog.org/>