#!/usr/bin/perl use strict; use warnings; use Pod::Advent; my $pod = shift @ARGV or die "need pod filename, or - for file on stdin, or + for snippet on stdin"; my $advent = Pod::Advent->new; if( $pod eq '-' ){ $advent->parse_file( \*STDIN ); }elsif( $pod eq '+' ){ local $/ = undef; my $s = "=pod\n\n" . . "\n\n=cut"; $Pod::Advent::BODY_ONLY = 1; $advent->parse_string_document( $s ); }else{ $advent->parse_file( $pod ); } if( $advent->num_spelling_errors ){ print STDERR "Possible SPELLING ERRORS:\n"; my %seen; foreach my $word ( $advent->spelling_errors ){ print STDERR "\t$word\n" unless $seen{$word}++; } } __END__ =pod =head1 NAME pod2advent - create Perl Advent Calendar html from POD file =head1 SYNOPSIS pod2advent entry.pod > entry.html cat entry.pod | pod2advent - > entry.html echo 'A' | pod2advent + =head1 DESCRIPTION Simple command-line wrapper for L. =cut