POE::Filter::Regexp - Fast spliting input stream
use POE::Filter::ErrorProof; my $wheel = POE::Wheel::ReadWrite->new( Driver => POE::Driver::SysRW->new( BlockSize =>16777216), #16M OMG ! Filter => POE::Filter::Regexp->new(qr/^HEAD:/), #each new chunk begins from /\nHEAD:/ );
This POE::Filter developed for reading large ammount of data from large files. On each iteration POE reads BlockSize octets from stream and put it to filter, filter returns array of sliced chunks in one bundle, and InputEvent called for each of it without runing POE's internal loop doing anything else. This construction blocks io but incredible fast on log processing, when main task of system - is parsing logs.
Vany Serezhkin <firstname.lastname@example.org>