Document::Parser - Base Class for Creating Text Format Parsers
package MyParser; use base 'Document::Parser'; sub create_grammar { return { # ... define a grammar hash here ... }; }
Document::Parser is a base class that you can use to easily generate a parser for text document markups (like Wiki or POD markups).
See this parser as an example:
http://svn.kwiki.org/kwiki/trunk/src/core/Spork/lib/Spork/Parser.pm
And this module for usage of the parser:
http://svn.kwiki.org/kwiki/trunk/src/core/Spork/lib/Spork/Formatter2.pm
Ingy döt Net
Copyright (c) 2007. Ingy döt Net. 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 Document::Tools, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Document::Tools
CPAN shell
perl -MCPAN -e shell install Document::Tools
For more information on module installation, please visit the detailed CPAN module installation guide.