Apache2-PodBrowser

 view release on metacpan or  search on metacpan

lib/Apache2/PodBrowser.pm  view on Meta::CPAN

</div>

=end html

POD provides the

 =begin html
 ...
 =end html

or

 =for html ...

syntax. This module supports it. If you look at this document via this
module you'll probably see a picture of me on the right side.

Example:

 =begin html

 <img align="right"
      alt="Picture of ..."
      src="http://host.name/image.jpg"
      border="0">

 =end html

You might notice that the image URL is absolute. Wouldn't it be good to
bundle the images with the module, install them somewhere beside it in
C<@INC> and reference them relatively?

It is possible to do that in perldoc mode.
Just strip off the C<.pm> or C<.pod> suffix
from the installed perl module file name and make a directory with that
name. For example assuming that this module is installed as:

 /perl/lib/Apache2/PodBrowser.pm

create the directory

 /perl/lib/Apache2/PodBrowser

and place the images there.

To include them in POD write:

 =begin html

 <img align="right"
      alt="Picture of ..."
      src="./Apache2::PodBrowser/torsten-foertsch.jpg"
      border="0">

 =end html

If the POD file name doesn't contain a dot (C<.>) the last path component
is stripped off to get the directory name.

Note that you need to write the package name again. You also need to
either escape the semicolons as in
C<src="Apache2%3A%3APodBrowser/torsten-foertsch.jpg"> or put a C<./>
in front of the link.

A note about the content type of linked documents. C<Apache::PodBrowser>
does not enter a new request cycle to ship these documents. So, the normal
Apache Content-Type guessing does not take place. C<Apache::PodBrowser> knows
a few file name extensions (C<png>, C<jpg>, C<jpeg>, C<gif>, C<js>,
C<pdf> and C<html>). For those it sends the correct Content-Type headers.
All other documents are shipped as C<application/octet-stream>.

If a document needs a different Content-Type header it can be passed as
CGI parameter:

 src="Apache2%3A%3APodBrowser/torsten-foertsch.jpg?ct=text/plain"

The link above will ship the image as C<text/plain>.

=head1 SEE ALSO

=over 4

=item L<Apache2::Pod::HTML>

=item L<Pod::Simple>

=item L<Pod::Simple::HTML>

=item L<Pod::Simple::Text>

=back

=head1 AUTHOR

Torsten Förtsch C<< <torsten.foertsch@gmx.net> >>

=head1 LICENSE

This package is licensed under the same terms as Perl itself.

=cut



( run in 0.520 second using v1.01-cache-2.11-cpan-39bf76dae61 )