יובל קוג'מן (Yuval Kogman) > Devel-Events-0.08 > Devel::Events::Filter::Callback

Download:
Devel-Events-0.08.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  3
Open  0
View/Report Bugs
Source  

NAME ^

Devel::Events::Filter::Callback - Callback based Devel::Events::Filter

SYNOPSIS ^

        use Devel::Events::Filter::Callback;

        Devel::Events::Filter::Callback->new(
                callback => sub {
                        my ( @event ) = @_;

                        return if bad_event(@event); # drop it

                        return map { filter($_) } @event; # change it
                },
                handler => $handler,
        );

DESCRIPTION ^

Duh.

ATTRIBUTES ^

handler

Devel::Events::Handler

callback

a code ref

METHODS ^

filter_event

Delegates to callback

syntax highlighting: