Papery::Renderer - Base class for Papery processors
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;
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.
Papery::Renderer
render()
Papery::Pulp
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.
_content
_output
This class provides a single method:
Render the _content metadata, and update the $pulp metadata and _output.
$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.