develooper Front page | perl.perl5.changes | Postings from May 2008

Change 33793: [PATCH lib/File/Copy.pm] Use 3-arg open.

From:
Rafael Garcia-Suarez
Date:
May 8, 2008 08:45
Subject:
Change 33793: [PATCH lib/File/Copy.pm] Use 3-arg open.
Change 33793 by rgs@scipion on 2008/05/08 15:43:55

	Subject: [PATCH lib/File/Copy.pm]  Use 3-arg open.
	From: Abigail <abigail@abigail.be>
	Date: Tue, 6 May 2008 17:38:28 +0200
	Message-ID: <20080506153828.GA27662@abigail.be>

Affected files ...

... //depot/perl/lib/File/Copy.pm#51 edit

Differences ...

==== //depot/perl/lib/File/Copy.pm#51 (text) ====
Index: perl/lib/File/Copy.pm
--- perl/lib/File/Copy.pm#50~33740~	2008-04-24 10:04:58.000000000 -0700
+++ perl/lib/File/Copy.pm	2008-05-08 08:43:55.000000000 -0700
@@ -163,7 +163,7 @@
     } else {
 	$from = _protect($from) if $from =~ /^\s/s;
        $from_h = \do { local *FH };
-       open($from_h, "< $from\0") or goto fail_open1;
+       open $from_h, "<", $from or goto fail_open1;
        binmode $from_h or die "($!,$^E)";
 	$closefrom = 1;
     }
@@ -182,7 +182,7 @@
     } else {
 	$to = _protect($to) if $to =~ /^\s/s;
        $to_h = \do { local *FH };
-       open($to_h,"> $to\0") or goto fail_open2;
+       open $to_h, ">", $to or goto fail_open2;
        binmode $to_h or die "($!,$^E)";
 	$closeto = 1;
     }
End of Patch.



Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About