Perl extension for processing event stream