summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdam Spiers <stow@adamspiers.org>2014-06-16 10:22:55 +0100
committerAdam Spiers <stow@adamspiers.org>2014-06-16 10:22:55 +0100
commitd788ce0c1c59b3158270143659f7a4363da73056 (patch)
tree9474f65b86df92a7bd4c35c43870820e1578873e /lib
parent20d3759ac12db66dab2187f0ba7898c35a64ad1d (diff)
downloadstow-d788ce0c1c59b3158270143659f7a4363da73056.tar.gz
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>
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Stow.pm.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Stow.pm.in b/lib/Stow.pm.in
index 98ecf35..948c7a6 100755
--- a/lib/Stow.pm.in
+++ b/lib/Stow.pm.in
@@ -1734,8 +1734,8 @@ sub read_a_link {
}
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");
}