NAME
Test::AllModules - do some tests for modules in search path
SYNOPSIS
# simplest
use Test::AllModules;
BEGIN {
all_ok(
search_path => 'MyApp',
check => sub {
my $class = shift;
eval "use $class;1;";
},
);
}
# if you need the name of test
use Test::AllModules;
BEGIN {
all_ok(
search_path => 'MyApp',
check => +{
'use_ok' => sub {
my $class = shift;
eval "use $class;1;";
},
},
);
}
# more tests, all options
use Test::AllModules;
BEGIN {
all_ok(
search_path => 'MyApp',
checks => [
+{
'use_ok' => sub {
my $class = shift;
eval "use $class;1;";
},
},
],
# `except` and `lib` are optional.
except => [
'MyApp::Role',
qr/MyApp::Exclude::.*/,
],
lib => [
'lib',
't/lib',
]
);
}
DESCRIPTION
Test::AllModules is do some tests for modules in search path.
EXPORTED FUNCTIONS
all_ok
do check(s)
code as ok() for every modules in search path.
REPOSITORY
Test::AllModules is hosted on github <http://github.com/bayashi/Test-AllModules>
AUTHOR
dann
Dai Okabayashi <bayashi@cpan.org>
SEE ALSO
LICENSE
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.