Plagger::Plugin::Filter::Base - Base filter class to handle HTML snippets
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); }
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:
text_only
- module: Filter::Foo config: text_only: 1
Tatsuhiko Miyagawa
Plagger, HTML::Parser
To install Plagger, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plagger
CPAN shell
perl -MCPAN -e shell install Plagger
For more information on module installation, please visit the detailed CPAN module installation guide.