avoid precedence warning

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

  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.

http://lists.gnu.org/archive/html/bug-stow/2014-06/msg00000.html

Suggested-by: Adam Sampson <ats@offog.org>
This commit is contained in:
Adam Spiers 2014-06-16 10:22:55 +01:00
parent 20d3759ac1
commit d788ce0c1c

View file

@ -1734,8 +1734,8 @@ sub read_a_link {
} }
elsif (-l $path) { elsif (-l $path) {
debug(4, " read_a_link($path): real link"); debug(4, " read_a_link($path): real link");
return readlink $path my $target = readlink $path or error("Could not read link: $path ($!)");
or error("Could not read link: $path ($!)"); return $target;
} }
internal_error("read_a_link() passed a non link path: $path\n"); internal_error("read_a_link() passed a non link path: $path\n");
} }