Skip Menu |

This queue is for tickets about the File-Copy-Link CPAN distribution.

Report information
The Basics
Id: 87227
Status: resolved
Priority: 0/
Queue: File-Copy-Link

People
Owner: Nobody in particular
Requestors: rurban [...] x-ray.at
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 0.100
  • 0.110
  • 0.111
  • 0.112
  • 0.113
Fixed in: 0.140



Subject: [PATCH] wrong return precedence
returns binds stronger than or, so the expressions after or are ignored. See https://rt.perl.org/rt3/Public/Bug/Display.html?id=59802
Subject: File-Copy-Link-0.113-returnor.patch
diff -bu File-Copy-Link-0.113-hsxeyo/lib/File/Copy/Link.pm~ File-Copy-Link-0.113-hsxeyo/lib/File/Copy/Link.pm --- File-Copy-Link-0.113-hsxeyo/lib/File/Copy/Link.pm~ 2011-09-23 10:14:51.000000000 -0500 +++ File-Copy-Link-0.113-hsxeyo/lib/File/Copy/Link.pm 2013-07-23 15:48:34.533307228 -0500 @@ -17,7 +17,7 @@ croak "$_ not a link\n" unless -l; open my $fh, '<', $_ or croak "Can't open link $_: $!\n"; unlink or croak "Can't unlink link $_: $!\n"; - return File::Copy::copy $fh, $_ or croak "copy($fh $_) failed: $!\n"; + return File::Copy::copy($fh, $_) || croak "copy($fh $_) failed: $!\n"; } sub safecopylink { @@ -27,7 +27,7 @@ my $orig = File::Spec::Link->linked($_); croak "$_ link problem\n" unless defined $orig; unlink or croak "Can't unlink link $_: $!\n"; - return File::Copy::copy $orig, $_ or croak "copy($orig $_) failed: $!\n"; + return File::Copy::copy($orig, $_) || croak "copy($orig $_) failed: $!\n"; } 1;
On Tue Jul 23 16:52:36 2013, rurban@x-ray.at wrote: Show quoted text
> returns binds stronger than or, so the expressions after or are ignored. > See https://rt.perl.org/rt3/Public/Bug/Display.html?id=59802