Pod::Stream::Parser - A simple stream based POD parser
use v6; require Pod::Stream::Parser; parse("path/to/file.pod", %event_handlers);
This is a very simple stream based POD parser, it is modeled after SAX style parsers and is currently still in the very early stages of development.
Functionality is severaly limited right now. See the tests for more details.
The main parse function currently takes a $filename and a Hash of %events which it uses to process each line of the file.
parse
$filename
%events
This event is fired when a '=pod' directive is reached.
This event is fired when a '=cut' directive is reached.
This event is fired once the '=head<n>' directive is reached. This does not include the text of the header, that will be processed as a interpolated string (to allow for any modifiers).
This event is fired after the '=head<n>' directive and it's accompanying text has been parsed.
This event is fired when a '=begin' directive is reached.
This event is fired when a '=end' directive (which is preceeded by an '=begin' directive) is reached.
This event is fired when a '=for' directive is reached.
This event is fired when a '=end' directive (which is preceeded by an '=for' directive) is reached.
This event is fired when an '=over' directive is reached.
This event is fired when a '=back' directive is reached.
This event is fired when an '=item' directive is reached, the next event fired will be any text which follows the item.
This event is fired once the last '=item' directive, followed by any text on the same line.
This event is fired once a verbatim section is found.
This event handles the entire verbatim string.
This event closes a verbatim section.
This event is begun when any block of characters is interpolated for modifiers.
This event is fired when interpolation is complete.
This event is fired when a modifier is encountered.
This event closes a modifier.
This event processes raw strings.
This event handles newlines in the text, it is a specialization of the 'string' event.
Any of the Perl5 POD parsers
stevan little, <stevan@iinteractive.com>
Copyright (c) 2005. Stevan Little. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
To install Perl6::Pugs, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl6::Pugs
CPAN shell
perl -MCPAN -e shell install Perl6::Pugs
For more information on module installation, please visit the detailed CPAN module installation guide.