| IO-Mux documentation | view source | Contained in the IO-Mux distribution. |
IO::Mux::File::Write - write to file
IO::Mux::File::Write is a IO::Mux::Handler::Write is a IO::Mux::Handler
my $mux = IO::Mux::Select->new; # or ::Poll
use IO::Mux::Open '>';
my $file = $mux->open('>', $filename);
use IO::Mux::File::Write;
my $file = IO::Mux::File::Write->new
(file => $filename, mode => '>>');
$mux->add($file);
$file->write($text);
$file->print($text);
write $file $text;
print $file $text;
Open a file to be written.
-Option --Defined in --Default append <false> create <true> exclusive <false> fh IO::Mux::Handler <required> file <required> mode '>' modeflags <undef> name IO::Mux::Handler '$mode$file' write_size IO::Mux::Handler::Write 4096
The file to be managed, either provided as FILENAME or as HANDLE. When a HANDLE is passed, most other options will be ignored. The HANDLE must be in non-blocking mode already and opened for writing (only).
The >> is short for normal open plus the append option set.
When defined, the mode, exclusive, create and append options
are not used, but your value is taken. Use constants defined by Fcntl.
Do not forget to include O_NONBLOCK.
The bits of the open mode.
This module is part of IO-Mux distribution version 0.11, built on January 26, 2011. Website: http://perl.overmeer.net/ All modules in this suite: Any::Daemon, IO::Mux, and IO::Mux::HTTP.
Please post questions or ideas to perl@overmeer.net
Copyrights 2011 by Mark Overmeer. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html
| IO-Mux documentation | view source | Contained in the IO-Mux distribution. |