The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Log::Saftpresse::Plugin - base class for saftpresse plugins

VERSION

version 1.6

Description

This is the base class for saftpresse processing plugins.

All plugin classes must inherit from this class.

Synopsis

  package Log::Saftpresse::Plugin::MyPlugin;
  
  use Moose;
  
  extends 'Log::Saftpresse::Plugin';

  sub process {
    my ( $self, $event ) = @_;

    $event->{'example_text'} = 'this is an example';
    $self->incr_one('examples', 'count');

    return;
  }
  
  1;

Attributes

name( $str )

The name of plugin instance.

counters( Log::Saftpresse::Counters )

Holds the counters of this plugin.

Methods

process( $event, $notes )

This method must be implemented by every plugin.

Saftpresse will call it for every processed event and pass $event and $notes.

init

This method is called after an instance of the plugin has been created.

A module could implement it to do initialization tasks.

incr, incr_one, incr_max

This methods are delegated to the counter object.

AUTHOR

Markus Benning <ich@markusbenning.de>

COPYRIGHT AND LICENSE

This software is Copyright (c) 1998 by James S. Seymour, 2015 by Markus Benning.

This is free software, licensed under:

  The GNU General Public License, Version 2, June 1991