Papery::Analyzer - Base class for Papery analyzers
package Papery::Analyzer::MyAnalyzer; use strict; use warnings; use Papery::Analyzer; our @ISA = qw( Papery::Analyzer ); sub analyze { my ( $class, $pulp ) = @_; # analyze $pulp->{meta}{_source} # update $pulp->{meta}{_text} return $pulp; } 1;
Papery::Analyzer is the base class for Papery analyzer classes. Subclasses only need to define an analyze() method, taking a Papery::Pulp object as the single parameter.
Papery::Analyzer
analyze()
Papery::Pulp
The analyze() method is expected to take the _source key from the Papery::Pulp object and use it to update the _text key, that will be later processed by Papery::Processor classes.
_source
_text
Papery::Processor
This class provides several methods:
Analyze the file under $path and update the $pulp object. $path is relative to __source.
$path
$pulp
__source
Analyze the _source metadata, extract the YAML Front Matter, and update the $pulp metadata and _text.
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.