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

Re: Change 19130: Cannot portably compare files if one of them is still open

Thread Previous | Thread Next
From:
Dan Kogai
Date:
April 5, 2003 07:28
Subject:
Re: Change 19130: Cannot portably compare files if one of them is still open
Message ID:
3926FC38-677B-11D7-B24B-000393AE4244@dan.co.jp
On Wednesday, April 2, 2003, at 03:00  PM, Jarkko Hietaniemi wrote:
> ==== //depot/perl/ext/Encode/t/enc_module.t#6 (text) ====
> Index: perl/ext/Encode/t/enc_module.t
> --- perl/ext/Encode/t/enc_module.t#5~19100~	Mon Mar 31 02:03:50 2003
> +++ perl/ext/Encode/t/enc_module.t	Tue Apr  1 20:42:40 2003
> @@ -38,6 +38,7 @@
>  print $obj->str, "\n";
>  $obj->set("¥Æ¥¹¥Èʸ»úÎó");
>  print $obj->str, "\n";
> +close STDOUT;
>
>  my $cmp = compare_text($file0, $file1);
>  is($cmp, 0, "encoding vs. STDOUT");
> @@ -51,7 +52,6 @@
>      is ($cmp[$i++], $_, "encoding vs. STDIN - $i");
>  }
>
> -close STDOUT;
>  unlink $file1 unless $cmp;
>  __END__

This is HOW IT WAS USED TO BE until Encode 1.92.  But Enache found this 
causes problem with FreeBSD4+thread so he first deleted "close STDOUT" 
but I told it it would break Win32 because Win32 does not allow you to 
unlink open files.

> ! t/enc_module.t AUTHORS
>   failure with threaded Perl on FreeBSD addressed.
>   Enache Adrian <enache@rdslink.ro> is added to AUTHORS for this.
>   Message-Id: <20030322230131.GA813@ratsnest.hole>

Please give me some time to come up with something elegant;  I'm still 
under the influence of pollen allergy....

Dan the Encode Maintainer

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