NAME

Papery::Processor - Base class for Papery processors

SYNOPSIS

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;

DESCRIPTION

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.

METHODS

This class provides a single method:

process( $pulp )

Process the _text metadata, and update the $pulp metadata and _content.

AUTHOR

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

COPYRIGHT

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

LICENSE

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