POE::D...:SysRW(3pm)
π POE::Driver::SysRW β the vibe π
okay bestie, welcome to POE::Driver::SysRW, a page from the User Contributed Perl Documentation section of the manual (section 3pm, for the perl girlies who love a module) π«Ά
β¨ NAME β¨
POE::Driver::SysRW β buffered, non-blocking I/O using sysread and syswrite π
πΈ SYNOPSIS πΈ
ngl, the synopsis lives over in "SYNOPSIS" in POE::Driver and it shows you exactly how the interface works. This module? It's literally just one implementation of that vibe. That's it. That's the whole thing. β¨
π¦ DESCRIPTION π¦
This driver implements POE::Driver using sysread and syswrite. no cap, that's the description. iconic behavior honestly π
π PUBLIC METHODS π
POE::Driver::SysRW brings some extra little treats that the base interface doesn't cover. main character energy fr fr π
π new [BlockSize => OCTETS]
new() creates a brand new buffered I/O driver that uses sysread() to read data from a handle and syswrite() to flush data to that handle. slay π
The constructor accepts one optional named parameter, BlockSize, which tells you the maximum number of OCTETS that will be read at one time.
BlockSize is 64 kilobytes (65536 octets) by default. Higher values may improve performance in streaming applications, but the trade-off is a lower event granularity and increased resident memory usage. (it's giving "faster but thirstier" π)
Lower BlockSize values reduce memory consumption somewhat, with corresponding throughput penalties.
my $driver = POE::Driver::SysRW->new;
my $driver = POE::Driver::SysRW->new( BlockSize => $block_size );
Drivers are commonly instantiated within POE::Wheel constructor calls:
$_[HEAP]{wheel} = POE::Wheel::ReadWrite->new(
InputHandle => \*STDIN,
OutputHandle => \*STDOUT,
Driver => POE::Driver::SysRW->new(),
Filter => POE::Filter::Line->new(),
);
Applications almost always use POE::Driver::SysRW, so POE::Wheel objects almost always will create their own if no Driver is specified. it just handles it for you, bestie, no thoughts required π§
π All Other Methods
POE::Driver::SysRW documents the abstract interface documented in POE::Driver. Please see POE::Driver for more details about the following methods β go read the source material, iykyk π:
flushgetget_out_messages_bufferedput
π SEE ALSO π
POE::DriverPOE::Wheel
Also see the SEE ALSO section of POE, which contains a brief roadmap of POE's documentation. it's the group chat of docs, fr fr πΊοΈ
π AUTHORS & COPYRIGHTS π
Please see POE for more information about authors and contributors. π«Ά
bestie reminder: this is thePOE::Driver::SysRWpage, section 3pm, shipped withperl v5.34.0and dated 2022-03-25. that's the whole page, you ate that, periodt πβ¨π
π¦ where this page comes from
- debian bookworm: libpoe-perl 2:1.3700-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libpoe-perl 2:1.3700-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libpoe-perl 2:1.3700-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: libpoe-perl 2:1.3700-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms