NAME

Pod::ToDocBook - Pluggable converter POD data to DocBook.

SYNOPSIS

use Pod::ToDocBook 'create_parser';
my $buf;
my $src = shift;
open FH, "< $src" or die "Error open $src: $!";
my $w = new XML::SAX::Writer:: Output => \$buf;

my $p = create_parser({header => 0, doctype => 'chapter'}, $w );
$p->parse( \*FH );
print $buf;

DESCRIPTION

Pod::ToDocBook - set of XML::ExtOn filters for process POD data.

  • Pod::ToDocBook::Pod2xml - convert POD to XML

  • Pod::ToDocBook::DoSequences - process format sequences and links

  • Pod::ToDocBook::ProcessHeads - process =head's elements

  • Pod::ToDocBook::TableDefault =back

    Sample for add new processor:

    package MyFilter1;
    use Test::More;
    use XML::ExtOn;
    use base 'XML::ExtOn';
    
    sub on_start_element {
        my ( $self ,$el ) = @_;
        if ( $el->local_name eq 'para') {
            #simply warn when para start
            diag "para!";
        }
    }
    
    package main;
    use strict;
    use warnings;
    use Pod::ToDocBook 'create_parser';
    
    my $buf;
    my $src = shift;
    open FH, "< $src" or die "Error open $src: $!";
    my $w = new XML::SAX::Writer:: Output => \$buf;
    #add custom filter "MyFilter1" to parser pipe
    my $p = create_parser({header => 0, doctype => 'chapter'}, "MyFilter1", $w );
    $p->parse( \*FH );
    print $buf;

FUNCTIONS

Create parser for process pod.

my $p = create_parser({header => 0, doctype => 'chapter', base_id=>'name_space'}, "MyFilter1", $w );
$p->parse( \*FH );

SEE ALSO

Pod::ToDocBook::Pod2xml, Pod::ToDocBook::DoSequences, Pod::ToDocBook::ProcessHeads, XML::ExtOn, XML::Writer, Pod::2::DocBook, Pod::ToDocBook::TableDefault

AUTHOR

Zahatski Aliaksandr, <zag@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2009 by Zahatski Aliaksandr

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 84:

You forgot a '=back' before '=head1'