Сергей Засенко > JLogger > JLogger::Filter

Download:
JLogger-1.001.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

JLogger::Filter - filter captured data

SYNOPSIS ^

    use base 'JLogger::Filter';

    sub filter {
        my ($self, $message) = @_;

        ...

        return 0;
    }

DESCRIPTION ^

This is a base class for data filters.

METHODS ^

Subclasses should implement method filter:

filter

    sub filter {
        my ($self, $message) = @_;

        return 1 if $message->{from} eq 'secret@jabber.com';

        return 0;
    }

Filters the data. Returns true if message has been filter and false otherwise.

syntax highlighting: