T. Linden > Pod-S5-0.08 > Pod::S5

Download:
Pod-S5-0.08.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.08   Source   Latest Release: Pod-S5-0.09

NAME ^

Pod::S5 - Generate S5 slideshow from POD source.

SYNOPSIS ^

 use Pod::S5;
 my $s5 = new Pod::S5(
              theme    => 'default',
              author   => 'root',
              creation => '1.1.1979',
              where    => 'Perl Republic',
              company  => 'Perl Inc.',
              name     => 'A slide about perl');
 print $s5->process($pod);

DESCRIPTION ^

Pod::S5 converts POD input to a S5 HTML slideshow. No additional software is required. Just write a POD file, run Pod::S5 on it - and you're done.

This is the perl module which actually generates the S5 markup output. It doesn't output nor create the S5 stuff such as stylesheets, images or the like. You are responsible to make those files available in the proper location.

METHODS ^

new(%param)

This creates a new Pod::S5 object. The variables required for slideshow generation must be supplied as a hash. Example:

 my $s5 = new Pod::S5(
              theme    => 'default',
              author   => 'root',
              creation => '1.1.1979',
              where    => 'Perl Republic',
              company  => 'Perl Inc.',
              name     => 'A slide about perl');

All parameters are required.

process($pod)

This actually generates the S5 slideshow from the supplied POD string. Look at the POD section for details about the POD format.

Returns the slideshow as single string. No stylesheet or images are contained, the string is just the XHTML code for the slideshow.

highlite(%hash)

You may call this before calling process() to overwrite the internal %highlite hash which is used for syntax highlighting.

See Syntax::Highlight::Engine::Kate how it must be formatted.

syntax(%syntax)

You may call this before calling process() to overwrite the internal syntax map for mapping from POD to XHTML.

This is the default:

 %syntax = (
              head1       => "h1",
              head2       => "h2",
              head3       => "h3",
              head4       => "h4",
              text        => "p",
              verbatim    => "code",
              b           => "b",
              i           => "i",
              u           => "u",
              c           => "code",
              f           => "i",
              g           => "img",
              list_number => "ol",
              list_bullet => q(ul class="incremental"),
              list_text   => "ul",
              item_number => "li",
              item_bullet => "li",
              item_text   => "li",
              table       => "table",
              row         => "tr",
              cell        => "td",
              );

You are encouraged to keep this mapping as is.

head($template)

You may call this before calling process() to overwrite the internal XHTML header template. Look at the Pod::S5 source how it currently looks. This is the original S5 header with template variables for replacement with the supplied parameters to new().

foot($string)

You may call this before calling process() to overwrite the internal XHTML footer.

POD ^

Beside the known perlpod markup some additions have been made:

Since we are generating a slideshow, the POD must be devided into pieces which can be used as slides. Slides will be separated by the =head1 title tag (which itself becomes the title of the slide.

 =head1 Intro --+
                |
 [..]           +------- Slide 1
 [..]           |
            ----+
 
 =head1 Intro --+
                |
 [..]           +------- Slide 2
 [..]           |
            ----+
 
 =head1 End   --+
                |
 [..]           +------- Slide 3
 [..]           |
            ----+

Each slide may contain any valid POD.

DEPENDENCIES ^

Syntax::Highlight::Engine::Kate is optional.

The S5 slideshow files.

SEE ALSO ^

S5 is already included in the script pod2s5 which is delivered together with Pod::S5.

LICENSE AND COPYRIGHT ^

Copyright (c) 2007 Thomas Linden

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

S5 Copyright (c) 2007 Eric Meyer S5 Version 1.2a (Attribution-ShareAlike 2.0 License)

BUGS AND LIMITATIONS ^

See rt.cpan.org for current bugs, if any.

INCOMPATIBILITIES ^

None known.

DIAGNOSTICS ^

To debug Pod::S5 use debug() or the perl debugger, see perldebug.

AUTHOR ^

Thomas Linden <tlinden |AT| cpan.org>

VERSION ^

0.08

syntax highlighting: