Posted on 2007-06-29 15:47:57-07 by rsthacker in response to 5134
Re: Documentation for direct use of modules
Sorry to take so long to respond, but I didn't even know this forum was here... There is some documentation under Prest Internals.
Basically, what you want to do is call
use Text::Restructured::Writer; my $writer = new Text::Restructured::Writer($writer_name, \%opt);

to instantiate a writer with a given name (probably 'html') and set of options such as are accepted by prest. Then you need to instantiate a copy of the reStructuredText parser and parse the text
use Text::Restructured; $rst_parser = new Text::Restructured(\%opt, $tool_id); $dom = $rst_parser->Parse($text, $source_name);

Finally, you have to call the writer with the parsed document object model
$output = $writer->ProcessDOM($dom);
Direct Responses: 5578 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.