No.
POD exists mainly¹ to write Perl module documentation², and therefore doesn't have many fancy features. Also, the primary output medium for POD is the terminal, where no such thing as a title exists conceptially³. It is, after all, just Plain and Old documentation.
1. Suprisingly many Perl books are written in POD.
2. The location of the POD document coincides with the thing discussed in the text.
3. The ps
name / $0
variable comes close, but is useless here.
This is also a technical problem: pod2html
uses Pod::Html
, which parses the command line, and wraps itself around Pod::Simple::XHTML
or something, without doing, or interfering with, the actual parsing. However, it already supplies a header and a footer, which sensibly overrides any default headers that might be emitted.
There are two interesting options how your problem can be solved:
You write a postprocessor that puts the value of the first
h1
into thetitle
. This should be <10 lines in a parser with XPath-support. Then you write a little script that ties these together, and can be invoked instead ofpod2html
.You take the existing wealth of POD parsers (and source code), and whip up your own HTML from POD generator. If all you are actually doing is a small fork, you could try to offer the modification to the original module.