AnnoCPAN::PodToHtml - Convert POD to HTML


AnnoCPAN documentation  | view source Contained in the AnnoCPAN distribution.

Index


NAME

Top

AnnoCPAN::PodToHtml - Convert POD to HTML

SYNOPSIS

Top

    # this is low-level use of Pod::Parser, in AnnoCPAN::DBI

    my $parser = AnnoCPAN::PodToHtml->new;

    my %methods = (
        VERBATIM,  'verbatim',
        TEXTBLOCK, 'textblock',
        COMMAND,   'command',
    );

    sub html {
        my ($self) = @_;
        my $method = $methods{$self->type};
        my @args = $self->content;
        if ($method eq 'command') {
            # split into command and content
            @args = $args[0] =~ /==?(\S+)\s+(.*)/s;
        }
        my $html = $parser->$method(@args);
    }

DESCRIPTION

Top

This is a subclass of Pod::Parser for converting POD into HTML. It overrides the verbatim, textblock, command, and interior_sequence methods.

SEE ALSO

Top

AnnoCPAN::DBI

AUTHOR

Top

Ivan Tubert-Brohman <itub@cpan.org>

COPYRIGHT

Top


AnnoCPAN documentation  | view source Contained in the AnnoCPAN distribution.