NAME
DocSet::Doc::Common
- Common functions used in DocSet::Doc
subclasses
SYNOPSIS
...
DESCRIPTION
Implements functions and bits of code which otherwise needed to be duplicated in many modules. These functions couldn't be put into the base class DocSet::Doc
. Certainly we could devise one more subclassing level but for now this gentle mix of inheritance and inclusion is doing its job just fine.
METHODS
postprocess_ps_pdf
$self->postprocess_ps_pdf()
renders ps and pdf version of a the current doc
fetch_pdf_doc_ver
%pdf_data = %{ $self->fetch_pdf_doc_ver() }
search for a pdf version of the same document in the parallel tree (usually the dst_html tree) and copy it to the same dir as the html version. Later we link to it from the html version of the document if the pdf version is found in the same directory as the html one.
The function returns a reference to a hash with the keys: size -- for the size of the file and the location of the file relative to the current document (it's in the same directory after all).
fetch_src_doc_ver
similar to fetch_pdf_doc_ver() but works with the source version of the document.
%src_data = %{ $self->fetch_src_doc_ver() }
fetch the source version of the same document in the parallel tree (usually the src tree) and copy it to the same dir as the html version. Later we link to it from the html version of the document if the source version is found in the same directory as the html one. Notice that we add a .orig extension, because otherwise the rendered version of the source document may have the same full name as the source file (e.g. if the source was .html and destination one is .html too).
The function returns a reference to a hash with the keys: size -- for the size of the source file and the location of the file relative to the current document (it's in the same directory after all).
pod_pom_html_view_seq_link_transform_path
my $linked_doc_path = $self->pod_pom_html_view_seq_link_transform_path($src_path)
this is an implementation of the view_seq_link_transform_path() callback used in
Pod::POM::HTML::view_seq_link()
, using theDocSet::Doc
's transform_src_doc() method over pre-scanned cache of the source documents the$src_path
is resolved into the path in the generated docset. So for example a the resourcedevel::help
in L<devel help doc|devel::helpgt could get resolved as mydocs/devel/help.html. For more info see the documentation forDocSet::Doc::transform_src_doc()
.Notice that since this method is a callback hook, it uses the runtime singleton function
DocSet::RunTime::get_render_obj()
to retrieve the current document object.pod_pom_html_anchor
my $anchor = $self->pod_pom_html_anchor($title);
this is a common function that takes the
$title
Pod::POM object, converts it into a <a name> html anchor and returns it.
AUTHORS
Stas Bekman <stas (at) stason.org>