1POE::Filter::Stream(3)User Contributed Perl DocumentationPOE::Filter::Stream(3)
2
3
4
6 POE::Filter::Stream - a no-op filter that passes data through unchanged
7
9 #!perl
10
11 use Term::ReadKey;
12 use POE qw(Wheel::ReadWrite Filter::Stream);
13
14 POE::Session->create(
15 inline_states => {
16 _start => sub {
17 ReadMode "ultra-raw";
18 $_[HEAP]{io} = POE::Wheel::ReadWrite->new(
19 InputHandle => \*STDIN,
20 OutputHandle => \*STDOUT,
21 InputEvent => "got_some_data",
22 Filter => POE::Filter::Stream->new(),
23 );
24 },
25 got_some_data => sub {
26 $_[HEAP]{io}->put("<$_[ARG0]>");
27 delete $_[HEAP]{io} if $_[ARG0] eq "\cC";
28 },
29 _stop => sub {
30 ReadMode "restore";
31 print "\n";
32 },
33 }
34 );
35
36 POE::Kernel->run();
37 exit;
38
40 POE::Filter::Stream passes data through without changing it. It
41 follows POE::Filter's API and implements no new functionality.
42
43 In the "SYNOPSIS", POE::Filter::Stream is used to collect keystrokes
44 without any interpretation and display output without any
45 embellishments.
46
48 POE::Filter for more information about filters in general.
49
50 The SEE ALSO section in POE contains a table of contents covering the
51 entire POE distribution.
52
54 None known.
55
57 Please see POE for more information about authors and contributors.
58
59
60
61perl v5.32.1 2021-01-27 POE::Filter::Stream(3)