Daisuke Murase > Pod-HTMLEmbed-0.04 > Pod::HTMLEmbed

Download:
Pod-HTMLEmbed-0.04.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.04   Source  

NAME ^

Pod::HTMLEmbed - Make clean html snippets from POD

SYNOPSIS ^

Get Pod::HTMLEmbed::Entry object from File:

    my $p   = Pod::HTMLEmbed->new;
    my $pod = $p->load('/path/to/pod.pod');

Or search by name in @INC

    my $p   = Pod::HTMLEmbed->new;
    my $pod = $p->find('Moose');

Or search by name in specified directory

    my $p   = Pod::HTMLEmbed->new( search_dir => ['/path/to/dir'] );
    my $pod = $p->find('Moose');

See Pod::HTMLEmbed::Entry for methods for $pod.

DESCRIPTION ^

This module generates small and clean HTML from POD file.

Unlike other pod2html modules, this module enables you to get section based html snippets. For example, you can get an html for SYNOPSIS section by following code:

    my $html = $pod->section('SYNOPSIS');

Also you can get simple "Table of contents" html like:

    <ul>
    <li><a href="#NAME">NAME</a></li>
    <li><a href="#SYNOPSIS">SYNOPSIS</a></li>
    <li><a href="#METHODS">METHODS</a></li>
     :
    </ul>

by following code:

    my $toc_html = $pod->toc;

You can easily create custom pod viewer with this module. Enjoy!

METHODS ^

new(%options)

Create new Pod::HTMLEmbed object. pod searcher/loader object.

Available options:

search_dir => 'ArrayRef'

Pod search directory.

If this value is set, find method use this directory as search target. Otherwise search @INC.

url_prefix => 'Str'

URL prefix for pod link url. Default is http://search.cpan.org/perldoc?.

find($pod_name)

Find pod by $pod_name and return Pod::HTMLEmbed::Entry object if it exists.

load($pod_file)

Load pod file ($pod_file) and return Pod::HTMLEmbed::Entry object if it exists.

SEE ALSO ^

Pod::HTMLEmbed::Entry.

AUTHOR ^

Daisuke Murase typester@cpan.org

COPYRIGHT AND LICENSE ^

Copyright (c) 2009 by KAYAC Inc.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

syntax highlighting: