diff options
author | Norbert Preining <norbert@preining.info> | 2024-03-15 03:06:35 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-03-15 03:06:35 +0000 |
commit | 12679ab7d3c2a210f4123163671b532b8b55d5f9 (patch) | |
tree | 0060d13467186ad977f4e73488ee20dd6c0017ab /systems/texlive/tlnet/tlpkg/tlperl/lib/FileHandle.pm | |
parent | 62170822e034fdd3f81de7274835d0d3b0467100 (diff) |
CTAN sync 202403150306
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tlperl/lib/FileHandle.pm')
-rw-r--r-- | systems/texlive/tlnet/tlpkg/tlperl/lib/FileHandle.pm | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/FileHandle.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/FileHandle.pm index 133221bb6b..a4ae1e437c 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/FileHandle.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/FileHandle.pm @@ -4,7 +4,7 @@ use 5.006; use strict; our($VERSION, @ISA, @EXPORT, @EXPORT_OK); -$VERSION = "2.03"; +$VERSION = "2.05"; require IO::File; @ISA = qw(IO::File); @@ -111,36 +111,36 @@ FileHandle - supply object methods for filehandles use FileHandle; - $fh = FileHandle->new; + my $fh = FileHandle->new; if ($fh->open("< file")) { print <$fh>; $fh->close; } - $fh = FileHandle->new("> FOO"); + my $fh = FileHandle->new("> FOO"); if (defined $fh) { print $fh "bar\n"; $fh->close; } - $fh = FileHandle->new("file", "r"); + my $fh = FileHandle->new("file", "r"); if (defined $fh) { print <$fh>; undef $fh; # automatically closes the file } - $fh = FileHandle->new("file", O_WRONLY|O_APPEND); + my $fh = FileHandle->new("file", O_WRONLY|O_APPEND); if (defined $fh) { print $fh "corge\n"; undef $fh; # automatically closes the file } - $pos = $fh->getpos; + my $pos = $fh->getpos; $fh->setpos($pos); - $fh->setvbuf($buffer_var, _IOLBF, 1024); + $fh->setvbuf(my $buffer_var, _IOLBF, 1024); - ($readfh, $writefh) = FileHandle::pipe; + my ($readfh, $writefh) = FileHandle::pipe; autoflush STDOUT 1; @@ -149,7 +149,7 @@ FileHandle - supply object methods for filehandles NOTE: This class is now a front-end to the IO::* classes. C<FileHandle::new> creates a C<FileHandle>, which is a reference to a -newly created symbol (see the C<Symbol> package). If it receives any +newly created symbol (see the L<Symbol> package). If it receives any parameters, they are passed to C<FileHandle::open>; if the open fails, the C<FileHandle> object is destroyed. Otherwise, it is returned to the caller. |