MetaPOD::Assembler - Glue layer that dispatches segments to a constructed Result
version 0.3.5
use MetaPOD::Assembler; my $assembler = MetaPOD::Assembler->new(); for my $file ( @files ) { my $object = $assembler->assemble_file( $file ); }
This, should be enough for the majority of use-cases.
At present, MetaPOD::Assembler only supports JSON specification out-of-the-box, but you can extend it to support any other defined specifications by replacing the format map
MetaPOD::Assembler
JSON
my $assembler = MetaPOD::Assembler->new( format_map => { JSON => 'MetaPOD::Format::JSON', YAML => 'MyProject::Format::YAML', });
Wraps "assemble_handle" in Pod::Eventual and returns a MetaPOD::Result for each passed file handle
MetaPOD::Result
Wraps "assemble_file" in Pod::Eventual and returns a MetaPOD::Result for each passed file
Wraps "assemble_string" in Pod::Eventual and returns a MetaPOD::Result for each passed string
Gets the class to load for the specified format from the internal map, "format_map"
$assembler->handle_segment( $segment_hash )
This is the callback point of entry that dispatches calls from the MetaPOD::Extractor, loads and calls the relevant Format ( via "get_class_for_format", validates that version specifications are supported ( via Format->supports_version($v) ) and then asks the given format to modify the current MetaPOD::Result object by parsing the given $segment_hash
MetaPOD::Extractor
Format
Format->supports_version($v)
$segment_hash
Kent Fredric <kentfredric@gmail.com>
This software is copyright (c) 2013 by Kent Fredric <kentfredric@gmail.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install MetaPOD, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MetaPOD
CPAN shell
perl -MCPAN -e shell install MetaPOD
For more information on module installation, please visit the detailed CPAN module installation guide.