On Fri, Oct 24, 2003 at 11:23:52PM +1000, Andrew Savige wrote: > Is it worth trying to agree on a de facto standard name for > such a beast: 99-pod.t/99_pod.t/99.pod.t/99pod.t?
Probably not worth the inevitable argument. > use Test::More; > > use File::Spec; > use File::Find; > use strict; > > eval { > require Test::Pod; > }; > > my $ok = !$@ && ($Test::Pod::VERSION >= '0.95'); > > if (!$ok) { > plan skip_all => "Test::Pod v0.95 required for testing POD"; > } else { > Test::Pod->import; > my @files; > my $blib = File::Spec->catfile(qw(blib lib)); > find( sub {push @files, $File::Find::name if /\.p(l|m|od)$/}, $blib); > plan tests => scalar @files; > foreach my $file (@files) { > pod_file_ok($file); > } > } Since skip_all will exit immediately you can fold that big "everything inside the else block" away. eval 'use Test::Pod'; my $have_testpod = !$@ and $Test::Pod::VERSION >= 0.95; plan skip_all => "Test::Pod v0.95 required for testing POD" unless $have_testpod; my @files; my $blib = File::Spec->catfile(qw(blib lib)); ... -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/ You're like a moment of mindblowing bliss.