Pod::HTML2Pod

Pod::HTML2Pod Perl module can translate HTML into POD.
Download

Pod::HTML2Pod Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Sean M. Burke
  • Publisher web site:
  • http://search.cpan.org/~sburke/

Pod::HTML2Pod Tags


Pod::HTML2Pod Description

Pod::HTML2Pod Perl module can translate HTML into POD. Pod::HTML2Pod Perl module can translate HTML into POD.SYNOPSIS # Use the program 'html2pod' that comes in this dist, or: use Pod::HTML2Pod; print Pod::HTML2Pod::convert( 'file' => 'my_stuff.html', # input file 'a_href' => 1, # try converting links );Larry Wall once said (1999-08-27, on the pod-people list, I do believe): "The whole point of pod is to get people to document stuff they wouldn't document in any other form."To that end, I wrote this module so that people who are unpracticed with POD but in a hurry to simply document their programs or modules, could write their documentation in simple HTML, and convert that to POD. That's what this module does.Specifically, this module bends over backwards to try to turn even vaguely plausable HTML into POD -- and when in doubt, it simply ignores things that it doesn't know about, or can't render.FUNCTIONSThis module provides one documented function, which it does not export:Pod::HTML2Pod::convert( ...options... )This returns a single scalar value containing the converted POD text, with some comments after the end.This function takes options:'file' => FILENAME,Specifies that the HTML code is to be read from the filename given.'handle' => *HANDLE,Specifies that the HTML code is to be read from the open filehandle given (e.g., $fh_obj, *HANDLE, *HANDLE{IO}, etc.) If you specify this, but fail to specify an actual handle object, inscrutible errors may result.'content' => STRING,Specifies that the HTML code is in the string given. (Alternately, pass a reference to the scalar: 'content' => $stuff.)'tree' => OBJ,Specifies that the HTML document is contained in the given HTML::TreeBuilder object (or HTML::Element object, at least).'a_name' => BOOLEAN,Specifies whether you want to try converting < a name="..." > elements. By default this is off -- i.e., such elements are ignored.'a_href' => BOOLEAN,Specifies whether you want to try converting < a href="..." > elements. By default this is off -- i.e., such elements are ignored. If on, bear in mind that relative URLs cannot be properly converted to POD -- any relative URLs will be complained about in comments after the end of the document. Normal absolute URLs will be treated as best they can be. Note that URLs beginning "pod:..." will be turned into POD links to whatever follows; that is, "pod:Getopt::Std" is turned into L< Getopt::Std >'debug' => INTEGER,Puts Pod::HTML2Pod into verbose debug mode for the duration of processing this this HTML document. INTEGER can be 0 for no debug output, 1 for a moderate amount that will cause the HTML syntax tree to be be dumped at the start of the conversion, and 2 for that plus a dump of the intermediate POD doctree, plus a few more inscrutible diagnostic messages. Looking at the trees dumped might be helpful in making sense of error messages that refer to a particular node in the parse tree. Requirements: · Perl


Pod::HTML2Pod Related Software