Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  DEVEL::EVENTS::MATCH (3)

.ds Aq ’


Devel::Events::Match - Event matching, splicing and dicing.



        use Devel::Events::Match;

        my $matcher = Devel::Events::Match->new;

        my @matching = $matcher->grep( match => $cond, events => \@events );


This class provides event list filtering, chunking etc based on a simple match format.

This class is used by Devel::Events::Handler::Log::Memory in order to ease access into the event log.


compile_cond Used to compile condition values into code references.

Scalars become equality tests on the first element (event type/name matches this).

Hashes become recursive conditions, where each key is matched on the field. The ’type’ pseudofield is the first element of the event. Every value in the hash gets compile_cond called on it recursively.

Code references are returned verbatim.

The output is a code reference that can be used to match events.

first %args Return the first event that matches a certain condition.

Requires the match and events parameters.

grep %args Return the list of events that match a certain condition.

Requires the match and events parameters.

limit from => $cond, to => $cond, %args Return events between two events. If from or to is omitted then it returns all the events up to or from the other filter (from defaults to sub { 1 } and to defaults to sub { 0 }).

If either the from_inclusive and to_inclusive parameters are provided and set to false then the range will only begin on the event after the from match and end on the event before the to match respectively.

Requires the events parameter.

chunk %args Cuts the event log into chunks. When $marker matches a new chunk is opened.

Requires the marker and events parameters.

The first and last parameters, when provided and false will cause the first and last chunks to be dropped, respectively.

The first chunk contains all the events up to the first matching one.

take_while %args
take_until %args
drop_while %args
drop_until %args Require the match and events parameters.


Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 216: ’=item’ outside of any ’=over’

=over without closing =back

Search for    or go to Top of page |  Section 3 |  Main Index

perl v5.20.3 DEVEL::EVENTS::MATCH (3) 2009-01-10

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.