The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Papery::Renderer - Base class for Papery processors

SYNOPSIS

    package Papery::Renderer::MyRenderer;
    
    use strict;
    use warnings;
    
    use Papery::Renderer;
    our @ISA = qw( Papery::Renderer );
    
    sub render {
        my ( $class, $pulp ) = @_;
    
        # render $pulp->{meta}{_content}
        # update $pulp->{meta}{_output}
    
        return $pulp;
    }
    
    1;

DESCRIPTION

Papery::Renderer is the base class for Papery renderer classes. Subclasses only need to define an render() method, taking a Papery::Pulp object as the single parameter.

The render() method is expected to take the _content key from the Papery::Pulp object and use it to update the _output key, that will be later saved to a file by the Papery::Pulp object itself.

METHODS

This class provides a single method:

render( $pulp )

Render the _content metadata, and update the $pulp metadata and _output.

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.