NAME
App::Slide - Perl extension for preparing slides from POD files, using the Template Toolkit.
VERSION
Version 0.92
SYNOPSIS
use App::Slide;
App::Slide->new(
pod_file => 'foo.pod',
slide_dir => 'foo/slides',
template_dir => 'prj/tmpl',
)->generate();
or, from the command line,
slide foo.pod foo/slides prj/tmpl
DESCRIPTION
Each =head1 becomes a slide.
NOT IMPLEMENTED: A '=for continue Junk' introduces a new slide, with the same title as the current one. The 'Junk' text needs to be there, else Pod::POM won't see it.
The slide identified by '=head1 conf' may contain configuration values, to be used in the template files as 'conf.foo'.
Check $self->error() after invoking constructor: if empty string, no errors occurred, else error message.
Template files must have the extension .tt.
Special slides: intro and toc, the introduction and table of contents, respectively.
All slides are given three digit numerical IDs, starting at 000.html.
Most of the display formatting is accomplished by the template files.
The entry page in index.html, with template index.tt. The page following that is toc.html, with template toc.tt.
The slides template will know about the following values:
title
prev
next
slide
If you want to use a .css file (for example), you must place it yourself in the appropriate directory, probably the slide_dir one.
TEMPLATE FILES
The template dir must contain the following files:
main.tt
index.tt
slide.tt
toc.tt
METHODS
new( [%args] )
Returns a reference to a newly constructed App::Slide
object, or undef if one of the required args is missing or if there is some other problem.
template_dir
Directory where the templates are found
slide_dir
Target directory for the slides
pod_file
Source file with the POD slides
If any of these three parms haven't been passed, or the constructor fails for some other reason, it returns undef.
errors()
Returns the error list.
generate()
Generates the output pages in the appropriate directory.
Returns the number of numbered slides generated. This excludes the index and TOC.
config_slides( $content )
Takes the config section of a slide file and parses it out, using Config::General.