Here is a program to write programs. In this case I want to replace all of the pod.t files in my working directories. I have wanted to do this for a while, and now I have. Andy's talking about Test::Harness or something doing automagically generating stuff like pod.t, cover.t, and whatnot, and then I will not have to write any of these tests.
Hey, I could even write a module to create these tests, and if a user has the module, the Makefile.PL creates the tests, otherwise it just goes on with life. People interested in testing and quality control could use the module, and others could just install the distro and get back to work. (I think Andy does this manually anyway, so you know automating it is just around the corner).
#!/usr/bin/perl
use File::Find::Rule;
my @files = File::Find::Rule->file ->name( 'pod.t' )->in( '/Users/brian/Dev' );
foreach my $file ( @files ) { print "$file\n"; rename $file, "$file.bak"; open my($fh), "> $file" or next; print $fh <<'HERE'; #$Id$ use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; all_pod_files_ok(); HERE
close $fh; }