Tatsuhiko Miyagawa > Plagger-0.7.3 > Plagger::Plugin::Filter::Base

Download:
Plagger-0.7.3.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  3
Open  0
View/Report Bugs
Source   Latest Release: Plagger-0.7.17

NAME ^

Plagger::Plugin::Filter::Base - Base filter class to handle HTML snippets

SYNOPSIS ^

  package Plagger::Plugin::Filter::Foo;
  use base qw( Plagger::Plugin::Filter::Base )

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

      # filter $body
      # store how many chunks are filtered into $count

      return ($count, $body);
  }

DESCRIPTION ^

Plagger::Plugin::Filter::Base is a base class for Plagger::Plugin::Filter to handle entry body with as much care as possible not to break HTML structure.

Your filter will support text_only configuration by subclassing this module:

  - module: Filter::Foo
    config:
      text_only: 1

AUTHOR ^

Tatsuhiko Miyagawa

SEE ALSO ^

Plagger, HTML::Parser

syntax highlighting: