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.
Papery::Processor
process()
Papery::Pulp
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.
_text
_content
Papery::Renderer
This class provides a single method:
Process the _text metadata, and update the $pulp metadata and _content.
$pulp
Philippe Bruhat (BooK), <book at cpan.org>
<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.
To install Papery, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Papery
CPAN shell
perl -MCPAN -e shell install Papery
For more information on module installation, please visit the detailed CPAN module installation guide.