Web::DataService::PodParser - Pod parser module for Web::DataService
This module provides an engine that can parse Pod and generate HTML, for use in generating data service documentation pages. It is used as follows:
my $parser = Web::DataService::PodParser->new(); $parser->parse_pod($doc_string); my $doc_html = $parser->generate_html({ attributes... });
This module provides the following methods:
This class method creates a new instance of the parser.
This method takes a single argument, which must be a string containing Pod text. A parse tree is built from this input.
This method uses the parse tree built by parse_pod to create HTML content. This content is returned as a single string, which can then be sent as the body of a response message.
parse_pod
This method takes an attribute hash, which can include any of the following attributes:
The value of this attribute should be the URL of a stylesheet, which will be included via an HTML <link> tag. It may be either an absolute or a site-relative URL.
If this attribute has a true value, then Pod lists will be rendered as HTML tables. Otherwise, they will be rendered as HTML definition lists using the tags dl, dt, and dd.
dl
dt
dd
The value of this attribute must be a code reference. This is called whenever an embedded link is encountered with one of the prefixes node:, op:, or path:, in order to generate a data service URL corresponding to the remainder of the link (see Web::DataService::Documentation).
node:
op:
path:
mmcclenn "at" cpan.org
Please report any bugs or feature requests to bug-web-dataservice at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Web-DataService. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-web-dataservice at rt.cpan.org
Copyright 2014 Michael McClennen, 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 Web::DataService, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Web::DataService
CPAN shell
perl -MCPAN -e shell install Web::DataService
For more information on module installation, please visit the detailed CPAN module installation guide.