#!/usr/pkg/bin/perl # socgen - Generate Steam of Consciousness HTML page # 2015 David Meyer <papa@sdf.org> +JMJ use Text::Template;; my $template = Text::Template->new(SOURCE => 'soc.tmpl') or die "Couldn't construct template: $Text::Template::ERROR"; my %vars = (title => 'Stream of Consciousness', css => 'soc.css', tagline => 'A new version using Text::Template', ); my $html = $template->fill_in(HASH => \%vars); if (defined $html) { print $html } else { die "Couldn't fill in template: $Text::Template::ERROR" }