Pod-HtmlEasy
view release on metacpan or search on metacpan
lib/Pod/HtmlEasy.pm view on Meta::CPAN
So, what are these optional local event subroutines? You have the ability to specify
when creating an instance of Pod::HtmlEasy replacements for the subroutines that process
the single-letter commands embedded in POD text, such as I<"B>I<<...>I<>>I<">, or the = commands,
such as =head1. You may also defined new single-letter commands by providing an event subroutine.
Of course, all of the defined commands have implementations. See L<Extending POD>.
=head1 Utility Functions
=head2 default_css
Returns the default CSS. To augment, remove the last line, add your changes, and replace
the last line.
=head2 pm_version ( pod2html )
Return the version of a Perl module file or I<undef>.
This is extracted from a statement that looks like "VERSION = 5.0008"
Needless to say, this is only avalable I<after> the POD is processed.
=head2 pm_package ( pod2html )
Return the package name of the module from which the POD was extracted or I<undef>.
Needless to say, this is only avalable I<after> the POD is processed.
=head2 pm_name ( pod2html )
Returns what follows the first instance of
C<=head1 NAME description> or I<undef>.
The description is picked up from what follows NAME on the same line,
I<or> from the first nonblank line following the C<=head1 NAME>.
Needless to say, this is only avalable I<after> the POD is processed.
=head2 pm_package_version_name ( pod2html )
Returns a list: ( pm_package, pm_version, pm_name )
Needless to say, this is only avalable I<after> the POD is processed.
=head1 CHARACTER SET
In compliance with L<HTML 4.01 specification|http://www.w3.org/TR/html4/>, Pod::HtmlEasy supports
the ISO 8859-1 character set (also known as Latin-1). In essence, this means that the full
8-bit character set is supported.
HTML provides an escape mechanism that allows characters to be specified by name; this kind of
specification is called an I<entity>.
Some characters must be converted to entities to avoid confusing user agents. This happens
automagically. These characters are: &, <, >, "
HTML (via its relationship with SGML) supports a large number of characters that are
outside the set supported by ISO 8859-1. These can be specified in the text by using
the E&ls;...> construct. These encodings are defined by ISO 10646, which is semi-informally
known as L<UNICODE|http://www.unicode.org/Public/5.0.0/ucd/UCD.html>. For example,
the "heart" symbol E&l;dhearts>.
These are listed in section 24.3.1,
L<The list of characters|http://www.w3.org/TR/html4/sgml/entities.html#h-24.4.1>
of the HTML 4.01 specification.
=head1 EMBEDDED URIs
Pod::HtmlEasy scans text (but not verbatim text!) for embedded URIs, such as C<http://foo.bar.com>
that are I<not> embedded in L <...>. Schemes detected are http, https, file and ftp. References
of the form foo@bar.com are treated as mailto references and are translated accordingly.
Previous versions handled a more extensive list of URIs. It was thought that the overhead for
processing these other schemes was not justified by their utility. That is, not supported by
the Firefox browser. YMMV if you're using Internet Explorer!
=head1 EXTENDING POD
You can extend POD defining non-standard events.
For example, to enable the command I<"=hr">:
my $podhtml = Pod::HtmlEasy->new(
on_hr => sub {
my ( $this , $txt ) = @_ ;
return "<hr>" ;
}
) ;
To define a new formatting code, do the same thing, but the code must be a single letter.
So, to enable I<"G>I<<...>I<>>I<">:
my $podhtml = Pod::HtmlEasy->new(
on_G => sub {
my ( $this , $txt ) = @_ ;
return "<img src='$txt' border=0>" ;
}
) ;
=head1 DEPENDENCIES
This script requires the following modules:
L<Pod::Parser>
L<Pod::ParseLink>
L<Pod::HtmlEasy::Parser>
L<Pod::HtmlEasy::Data>
L<Carp>
L<English>
L<English>
L<File::Slurp>
L<Regexp::Common>
L<Readonly>
L<Switch>
L<version>
=head1 DEFAULT CSS
This is the default CSS added to the HTML.
I<If you want to do your own CSS, use this as base.>
BODY {
background: white;
( run in 1.465 second using v1.01-cache-2.11-cpan-71847e10f99 )