
Papery::Processor - Base class for Papery processors

package Papery::Processor::MyProcessor;
use strict;
use warnings;
use Papery::Processor;
our @ISA = qw( Papery::Processor );
sub process {
my ( $class, $pulp ) = @_;
# process $pulp->{meta}{_text}
# update $pulp->{meta}{_content}
return $pulp;
}
1;

Papery::Processor is the base class for Papery processor classes. Subclasses only need to define an process() method, taking a Papery::Pulp object as the single parameter.
The process() method is expected to take the _text key from the Papery::Pulp object and use it to update the _content key, that will be later rendered by Papery::Renderer classes.

This class provides a single method:
Process the _text metadata, and update the $pulp metadata and _content.

Philippe Bruhat (BooK), <book at cpan.org>

Copyright 2010 Philippe Bruhat (BooK), all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.