develooper Front page | perl.perl5.porters | Postings from December 2003

Re: [PATCH] Re: perl @ 21830

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
December 3, 2003 03:17
Subject:
Re: [PATCH] Re: perl @ 21830
Message ID:
20031203121341.23447cab.rgarcia@hexaflux.com
Steve Hay wrote:
> That's wrong -- config.h.new and ../lib/CORE/config.h are certainly not 
> identical, it's just that File::Copy thinks they are since change 
> 21797.  This patch fixes it:
> 
> =====
> --- lib\File\Copy.pm.orig    2003-11-30 11:36:00.000000000 +0000
> +++ lib\File\Copy.pm    2003-12-03 10:24:05.524700100 +0000
> @@ -78,7 +78,7 @@
>      }
>  
>      if ((($Config{d_symlink} && $Config{d_readlink}) || $Config{d_link}) &&
> -    !($^O eq 'Win32' || $^O eq 'os2' || $^O eq 'vms')) {
> +    !($^O eq 'MSWin32' || $^O eq 'os2' || $^O eq 'vms')) {

Good catch.

>      my @fs = stat($from);
>      if (@fs) {
>          my @ts = stat($to);
> =====
> 
> However, the testsuite fails lib/File/Copy.t tests 14 and 28.  These 
> relate to hard links.  The tests would be skipped if $Config{d_link} 
> isn't true, but it is:
> 
> C:\Temp\perl-21830\t>perl -I..\lib -V:d_link
> d_link='define';
> 
> But Copy.pm will never emit the "are identical" error that Copy.t is 
> expecting because the error is emitted within the "if" block in the 
> patch above, the conditional of which is always false on MSWin32.  Is it 
> the module or the test that is wrong?

Depends. How can we test if two files are identical, link()-wise,
on MSWin32 ? If we can test it, we should fix Copy.pm by adding
another branch to the if() :
    elsif ($^O eq 'MSWin32' && $Config{d_link}) {...}
If we can't, we should fix the test so it's skipped on Windows.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About