#!/opt/perl/bin/perl use common::sense; use Pod::POM; use Template; use YAML; my $parser = new Pod::POM meta => 1; my ($pom, $html); $pom = $parser->parse ("src/news.pod") or die $parser->error; $html = $pom->present ("PodHTML"); $html =~ s/\[//g; open FH, ">", "src/news.html.inc" or die "src/news.html.inc: $!"; print FH $html; close FH; %PodRSS::metadata = %{ $pom->metadata }; $html = $pom->present ("PodRSS"); open FH, ">", "src/news.rss" or die "src/news.rss: $!"; print FH $html; close FH; system "rsync -avP src/. html/. --del --delete-excluded --exclude CVS"; =head1 AUTHOR Copyright © 2010 The Deliantra Team Copyright © 2007 Pippijn van Steenhoven =head1 LICENSE This library is free software, you can redistribute it and/or modify it under the terms of the GNU General Public License. =cut 1; package PodRSS; use strict; use warnings; use utf8; use base "Pod::POM::View"; our %metadata; sub view_pod { my ($self, $item) = @_; "\n" . "\n" . $item->content->present ($self) . "\n" } sub view_head1 { my ($self, $item) = @_; my $title = $item->title->present ($self); " \n", " $metadata{link}\n", " $metadata{language}\n", " $title\n", $item->content->present ($self), " \n" } sub view_head2 { my ($self, $item) = @_; my $title = $item->title->present ($self); " \n", " $title\n", $item->content->present ($self), " \n" } sub view_textblock { my ($self, $item) = @_; " \n" }