[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-stow] Trivial patch for stow with Perl 5.20
From: |
Adam Spiers |
Subject: |
Re: [Bug-stow] Trivial patch for stow with Perl 5.20 |
Date: |
Mon, 16 Jun 2014 10:28:13 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Jun 06, 2014 at 09:02:44PM +0100, Adam Sampson wrote:
> 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,
Thanks a lot Adam. I had to incorporate your patch manually since it
didn't apply against latest git master:
https://github.com/aspiers/stow/commit/d788ce0c1c59b3158270143659f7a4363da73056
(In future it would be fantastic if you could send github pull
requests rather than patches!)
If you could test https://github.com/aspiers/stow/tree/master and
confirm it works with 5.20 that would be very helpful. The fix will
be in the next release.
Thanks again!
Adam