Subject: | syntax problems |
With perl-5.8.0 (ithreads) on Solaris 7 (Sparc), I noticed the
following warnings in all tests of Tie::File:
Parentheses missing around "my" list at /home/hwadm/.cpan/build/Tie-File-0.95/blib/lib/Tie/File.pm line 673.
Parentheses missing around "my" list at /home/hwadm/.cpan/build/Tie-File-0.95/blib/lib/Tie/File.pm line 699.
The patch below corrects the problem:
--- Tie-File-0.95/lib/Tie/File.pm 2003-05-08 08:38:40.000000000 +0200
+++ Tie-File-0.95p/lib/Tie/File.pm 2003-05-13 15:03:02.761134000 +0200
@@ -670,7 +670,8 @@
my $fh = $self->{fh};
$self->_seekb($spos);
- my $bytes_read = read $fh, my $data, $readsize;
+ my $data;
+ my $bytes_read = read $fh, $data, $readsize;
$self->_seekb($dpos);
if ($data eq "") {
$self->_chop_file;
@@ -696,7 +697,8 @@
my $readsize = ! defined($len) ? $blocksize
: $len > $blocksize? $blocksize : $len;
$self->_seekb($pos);
- read $fh, my $old, $readsize;
+ my $old;
+ read $fh, $old, $readsize;
$data .= $old;
$self->_seekb($pos);
my $writable = substr($data, 0, $readsize, "");