YA Perl Advent Calendar 2005-12-07

Jerrad Pierce

View maximized for best effect.

All Apologies

For any readers without a modern CSS feature-ful browser, you'll be able to read the presentation but it'll be like watching somebody else fill out a crossword puzzle. We apologize for the incovenience.

—The Management


Last night a new "toy" slipped onto CPAN mirrors...


So what is it?

Awhile back there was a sudden proliferation of standards compliant web-based presentation systems with enough features to make PowerPoint users jealous.

  • SlideML

  • HTML Slidy

  • S5

And then there was one

Okay, so there weren't that many, and SlideML isn't exactly the same thing... moving on.

Great minds think alike

Apparently I wasn't the only who thought one of these needed to join with POD to create Yet Another slide system. My intent though, was to graft it onto PerlPoint (Bundle).

P.S. It turns out an S5 PerlPoint converter is in the works

DLL hell

Besides dependencies on such heavyweights as Template::Toolkit, POSIX and Encode, as well as the spod5 author's own Pod::POM::View::HTML::Filter, the distribution ought to be relatively easy to install if you have a reasonably sane setup.

Getting it to work

So the module, understandably, does not come with the ½ megabyte S5 toolkit. However, the documentation is a little unclear on what you're supposed to do with it. It implies a certain dependency but that's about it. The rendered output without the toolkit is a vanilla HTML document, so at least that works.

Full steam ahead!

If we blindly unzip the S5 tooklit in the same directory as our presentation everything works, however you can't help but wonder if all of that crud is really necessary.

what the?

Like, why does MACOSX get a doubly private directory? I thought this was supposed to be standards compliant?

Taking out the garbage

It looks like the OSX cruft is a resource fork, and you can safely remove everything but ui/default

rm -rf __MACOSX pix primer* s5-* structure-* ui/i18n xoxo-s*

Why I didn't link to the slide systems

It seems you can't have both clean links and automagic bulleted lists, not that I really expected this to work:

  =begin html
  * <a href="http://www.slideml.org/">SlideML</a>
  * <a href="http://www.w3.org/Talks/Tools/Slidy/">HTML Slidy</a>
  * <a href="http://www.meyerweb.com/eric/tools/s5/">s5</a>
  =end html

But wait there's more!

You can have POD L<...> links

Or you could code your own list in an HTML section.

Titles are important

It's very important that you include a title after your =head1-ings otherwise that slide's contents will be in the background throughout the presentation. This could potentially lend itself to interesting effects, though there are probably better ways of achieving them.

Speaking of titles

How did I manage to set mine? There's a brief mention of meta, but that's not much to go on. The S5 tutorial fills us in on the fact that we're supposed to use lots of <meta>s to tag up our presentation. Alas, the obvious doesn't work

  =begin html
  <meta name="author" value="belg4mit">
  =end html

Under the covers

A quick grep of the script and a glance at the Pod::POM documentation shows us that the accepted syntax is

  =meta title YA Perl Advent Calendar 2005-12-07

=begin filter

The script inherits some nifty features from BooK's module, Pod::POM::View::HTML::Filter. We can even call up our old friend Perl::Tidy like so

  =begin filter perl -nnn -css=../style.css
    foreach( 99..1 ){
      print "$_ bottles of beer on the wall, $_ bottles of beer\n";
      print "take one down pass it around,   $_ bottles of beer on the wall\n";
  =end filter

Et voilà

We get syntax highlighted code.

     1 foreach( 99..1 ){
     2   print "$_ bottles of beer on the wall, $_ bottles of beer\n";
     3   print "take one down pass it around,   $_ bottles of beer on the wall\n";
     4 }

Although perltidy's -css option is unavailable so you must use the document CSS.


It's not clear why you have to jump through such hoops to include HTML in an HTML presentation format. Worse still =begin/=end html doesn't even work. But, this is an initial release and as the documentation states

  this script is just a quick hack for YAPC::Europe 2005


I think this tool shows great promise, but could stand a little honing e.g; smarter title casing, although that's language specific.

Follow the link below for the source to this presentation.


I'd hoped to use another feature on the next page to inline the source as a part of the document but =include will helpfully interpret the included pod for you :-P ... regardless of extension.


Chapter 22: In which I shift my butt