NAME
IOMux::File::Write - write to file
INHERITANCE
IOMux::File::Write
is an IOMux::Handler::Write
is an IOMux::Handler
SYNOPSIS
my
$mux
= IOMux::Select->new;
# or ::Poll
my
$file
=
$mux
->
open
(
'>'
,
$filename
);
use
IOMux::File::Write;
my
$file
= IOMux::File::Write->new
(
file
=>
$filename
,
mode
=>
'>>'
);
$mux
->add(
$file
);
$file
->
write
(
$text
);
$file
->
(
$text
);
write
$file
$text
;
$file
$text
;
DESCRIPTION
Open a file to be written.
Extends "DESCRIPTION" in IOMux::Handler::Write.
METHODS
Extends "METHODS" in IOMux::Handler::Write.
Constructors
Extends "Constructors" in IOMux::Handler::Write.
- IOMux::File::Write->new(%options)
-
-Option --Defined in --Default
append <false>
create <true>
exclusive <false>
fh IOMux::Handler <required>
file <required>
mode
'>'
modeflags <
undef
>
name IOMux::Handler
'$mode$file'
write_size IOMux::Handler::Write 4096
- append => BOOLEAN
- create => BOOLEAN
- exclusive => BOOLEAN
- fh => FILEHANDLE
- file => FILENAME|HANDLE
-
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).
- mode => '>'|'>>'
-
The
>>
is short for normal open plus the append option set. - modeflags => INTEGER
-
When defined, the
mode
,exclusive
,create
andappend
options are not used, but your value is taken. Use constants defined by Fcntl. Do not forget to includeO_NONBLOCK
. - name => STRING
- write_size => INTEGER
- IOMux::File::Write->open($mode, $file, %options)
Accessors
Extends "Accessors" in IOMux::Handler::Write.
- $obj->fh()
-
Inherited, see "Accessors" in IOMux::Handler
- $obj->fileno()
-
Inherited, see "Accessors" in IOMux::Handler
- $obj->mode()
-
The bits of the open mode.
- $obj->mux()
-
Inherited, see "Accessors" in IOMux::Handler
- $obj->name()
-
Inherited, see "Accessors" in IOMux::Handler
- $obj->usesSSL()
-
Inherited, see "Accessors" in IOMux::Handler
- $obj->writeSize( [$integer] )
-
Inherited, see "Accessors" in IOMux::Handler::Write
User interface
Extends "User interface" in IOMux::Handler::Write.
Multiplexer
Extends "Multiplexer" in IOMux::Handler::Write.
Helpers
Extends "Helpers" in IOMux::Handler::Write.
- $obj->extractSocket(HASH)
- IOMux::File::Write->extractSocket(HASH)
-
Inherited, see "Helpers" in IOMux::Handler
- $obj->fdset($state, $read, $write, $error)
-
Inherited, see "Helpers" in IOMux::Handler
- $obj->show()
-
Inherited, see "Helpers" in IOMux::Handler
SEE ALSO
This module is part of IOMux distribution version 1.01, built on January 15, 2020. Website: http://perl.overmeer.net/CPAN
LICENSE
Copyrights 2011-2020 by [Mark Overmeer <markov@cpan.org>]. 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://dev.perl.org/licenses/