lib/WWW/Mechanize/FormFiller.pm lib/WWW/Mechanize/FormFiller/Value.pm lib/WWW/Mechanize/FormFiller/Value/Fixed.pm lib/WWW/Mechanize/FormFiller/Value/Default.pm lib/WWW/Mechanize/FormFiller/Value/Callback.pm lib/WWW/Mechanize/FormFiller/Value/Interactive.pm lib/WWW/Mechanize/FormFiller/Value/Random.pm
Comments on portability etc. are very welcome, as I want to release modules using this test via CPAN and I don't want too many portability errors :-)
use strict; use vars qw( @modules ); BEGIN { @modules = qw( WWW::Mechanize::FormFiller WWW::Mechanize::FormFiller::Value WWW::Mechanize::FormFiller::Value::Fixed WWW::Mechanize::FormFiller::Value::Default WWW::Mechanize::FormFiller::Value::Callback WWW::Mechanize::FormFiller::Value::Interactive WWW::Mechanize::FormFiller::Value::Random )}; use Test::More tests => scalar @modules; sub test_module_pod { my $modulename; for $modulename (@_) { # We assume that we live in the t/ directory, and that our main mo +dule lives below t/../lib/ my @modulepath = (File::Spec->splitpath($FindBin::Bin)); pop @modulepath; push @modulepath, "lib",split /::/, $modulename; my $constructed_module_name = File::Spec->catfile(@modulepath) . " +.pm"; pop @modulepath; pod_ok($constructed_module_name); }; }; SKIP: { eval { require FindBin; FindBin->import() }; skip "Need FindBin to check the Pod", scalar @modules if $@; eval { require File::Spec; File::SpecBase->import() }; skip "Need File::Spec to check the Pod",scalar @modules if $@; eval { require Test::Pod; Test::Pod->import() }; skip "Need Test::Pod to check the Pod",scalar @modules if $@; test_module_pod($_) for @modules; # make warnings.pm happy $FindBin::Bin eq $FindBin::Bin or 1; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Test the Pod of your files
by adrianh (Chancellor) on Jan 06, 2003 at 17:58 UTC | |
|
•Re: Test the Pod of your files
by merlyn (Sage) on Jan 06, 2003 at 17:59 UTC | |
by Corion (Patriarch) on Jan 06, 2003 at 18:12 UTC | |
by Anonymous Monk on Jan 06, 2003 at 18:18 UTC | |
by TStanley (Canon) on Jan 06, 2003 at 19:14 UTC | |
by Anonymous Monk on Jan 06, 2003 at 19:27 UTC | |
by TStanley (Canon) on Jan 06, 2003 at 20:58 UTC |