Test::AllModules - do some tests for modules in search path
# 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', ] ); }
Test::AllModules is do some tests for modules in search path.
do check(s) code as ok() for every modules in search path.
check(s)
Test::AllModules is hosted on github <http://github.com/bayashi/Test-AllModules>
dann
Dai Okabayashi <bayashi@cpan.org>
Test::LoadAllModules
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
To install Test::AllModules, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::AllModules
CPAN shell
perl -MCPAN -e shell install Test::AllModules
For more information on module installation, please visit the detailed CPAN module installation guide.