Grant's XML slide generator

#!/usr/bin/perl -w

use strict;

use XML::LibXML;
use Data::Dumper;

my %template = (
  index => Template::MasonLite->new_from_file('./_index.html'),
  toc   => Template::MasonLite->new_from_file('./_toc.html'),
  slide => Template::MasonLite->new_from_file('./_slide.html'),
  notes => Template::MasonLite->new_from_file('./_notes.txt'),
);

my $file = 'talk.xml';

my $parser = XML::LibXML->new;
my $doc    = $parser->parse_file($file);
my $root   = $doc->getDocumentElement;

gen_title_page($root);
gen_contents_page($root);
gen_slides($root);
gen_notes($root);

exit;


sub gen_title_page {
  my($doc) = @_;

  ...