summaryrefslogtreecommitdiff
path: root/opcode.pl
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-08-28 02:37:41 +0000
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1996-08-28 02:37:41 +0000
commit9b01e405a9bb7e4ded558565e812624f7c7f28fe (patch)
treef9d2830c11c9276c971343ebf74b02f1d2962e2d /opcode.pl
parentb5470100d305ad04c1e682dd4b1a313c58003e2a (diff)
downloadperl-9b01e405a9bb7e4ded558565e812624f7c7f28fe.tar.gz
Re: truncate with file name does not work (with patch)
The prototype for truncate was changed so that perl won't die with C<use strict;> when the first arg is a bareword (filehandle). I think it was Tom (as in "tchrist") who brought this up. Here's a patch that undoes the damage, makes it work with C<use strict;>, and adds to the testsuite.
Diffstat (limited to 'opcode.pl')
-rwxr-xr-xopcode.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/opcode.pl b/opcode.pl
index 2c2bc50a50..50cf214821 100755
--- a/opcode.pl
+++ b/opcode.pl
@@ -477,7 +477,8 @@ recv recv ck_fun imst F R S S
eof eof ck_eof is F?
tell tell ck_fun st F?
seek seek ck_fun s F S S
-truncate truncate ck_trunc is F S
+# truncate really behaves as if it had both "S S" and "F S"
+truncate truncate ck_trunc is S S
fcntl fcntl ck_fun st F S S
ioctl ioctl ck_fun st F S S