++ed by:

1 non-PAUSE user(s).

T. Linden

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.

  • Images can be included using the tag G<image.png>. You must manually copy images to the target directory.

  • Plain HTML code can be included using the html formatter, eg:

     =begin html
     
     <title>Blah</title>
     
     =end html
  • You can create incremental slides using bullet lists, that is each list item will appear separately, as if it were on an extra slide.

    Example:

     =over
     
     =item *
     
     1st item
     
     =item *
     
     2nd item
     
     =back
  • You can add special formatters for code, which will be syntax highlighted if the module Syntax::Highlight::Engine::Kate is installed. Use the name of the programming language as the formatter name.

    Example:

     =begin perl
     
     if ($var) {
      exit;
     }
     
     =end perl

    To get a list of the available languages, refer to the Syntax::Highlight::Engine::Kate manpage.

  • Notes can be added to a slide by inserting a note formatter, eg:

     =begin note
    
     some additional stuff
    
     =end note

    It will be rendered as plain text.

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-2011 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.09