NAME

Pod::Simple::XHTML::BlendedCode - Blends syntax-highlighted code and pod in one XHTML document.

VERSION

This document describes Pod::Simple::XHTML::BlendedCode version 2.000

SYNOPSIS

use Pod::Simple::XHTML::BlendedCode 2.000 qw();

my $parser = Pod::Simple::XHTML::BlendedCode->new();

# These routines are specific to Pod::Simple::XHTML::BlendedCode.
$parser->internal_modules_hash({
    'Perl::Dist::WiX(.*)?'   => 'Perl-Dist-WiX/', # Key can be a regex.
    'Perl::Dist::VanillaWiX' => 'Perl-Dist-WiX/',
    'File::List::Object'     => 'File-List-Object/',
    'Alien::WiX'             => 'Alien-WiX/',
});
$parser->internal_url_postfix('.pm.html');
$parser->internal_url_prefix('http://csjewell.comyr.com/perl/');
$parser->internal_url_divide_slashes(1);

# Since this is a subclass of Pod::Simple::XHTML,
# you can use all of its routines.
$parser->index(1);
$parser->html_css('code.css');
$parser->parse_file('Perl-Dist-WiX\\lib\\Perl\\Dist\\WiX.pm');

DESCRIPTION

This class is a formatter that takes Pod and Perl code and renders it as XHTML validating HTML.

This is a subclass of Pod::Simple::XHTML and inherits all its methods.

METHODS

Pod::Simple::XHTML::BlendedCode offers additional methods that modify the format of the HTML output. Call these after creating the parser object, but before the call to parse_file or parse_string_document:

my $parser = Pod::Simple::XHTML::BlendedCode->new();
$parser->set_optional_param("value");
$parser->parse_file($file);

internal_modules_hash

This determines which modules are internal to your own web site.

The module names in L<> links are compared against the regular expressions (wrapped in \A and \z) that are contained in the keys. If no keys match, then normal link processing is used.

If a key matches, then it is considered a "site-internal" link and the value is appended to internal_url_prefix for this link, and internal_url_divide_slashes and internal_url_postfix are also used when creating the link.

If you are putting all modules in one path (so that there are no per-distribution prefixes), set the values to the empty string.

This defaults to an empty hashref, and a hashref must be passed in.

internal_url_divide_slashes

If this is set to a true value, then slashes are used to divide the portions of a module name in the URL generated for an internal link.

If not, then the module name is left as is.

internal_url_prefix

In turning an internal link to Foo::Bar into http://whatever/Foo%3a%3aBar or http://whatever/Foo/Bar, what to put before the "Foo%3a%3aBar" or "Foo/Bar". This option is not set by default.

perldoc_url_postfix

What to put after "Foo%3a%3aBar" or "Foo/Bar" in the URL for an internal link. This option is not set by default.

tab_to_spaces

How many spaces a tab is equivalent to. Defaults to 4.

DIAGNOSTICS

"The parser's internal_modules_hash method is not returning a hashref" will be croaked upon processing of the first pod link when the interal_modules_hash method was passed anything but a hashref previously.

Also, this module will report any diagnostic Pod::Simple::XHTML will, as well as any diagnostic that Pod::Parser will during the blending process.

CONFIGURATION AND ENVIRONMENT

Pod::Simple::XHTML::BlendedCode requires no configuration files or environment variables.

DEPENDENCIES

Perl 5.8.1 is the mimimum version of perl that this module will run on.

Other modules that this module depends on are Pod::Simple::XHTML, PPI::HTML 1.08, and parent 0.223.

INCOMPATIBILITIES

None reported.

BUGS AND LIMITATIONS (SUPPORT)

No bugs have been reported.

Bugs should be reported via:

1) The CPAN bug tracker at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Pod-Simple-XHTML-BlendedCode if you have an account there.

2) Email to <bug-Pod-Simple-XHTML-BlendedCode@rt.cpan.org> if you do not.

AUTHOR

Curtis Jewell <csjewell@cpan.org>

SEE ALSO

http://csjewell.comyr.com/perl/ (for examples of the output of this module.)

LICENSE AND COPYRIGHT

Copyright (c) 2010, 2014 Curtis Jewell <csjewell@cpan.org>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either version 5.8.1 or any later version. See perlartistic and perlgpl.

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

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.