The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

# inspired by:
use strict;
my $dir = path(__FILE__)->parent(2)->child('lib');
my $iter = $dir->iterator(
{
recurse => 1,
follow_symlinks => 0,
}
);
while (my $path = $iter->()) {
next if $path->is_dir(); # avoid directories...
next unless $path =~ /\.pm$/mxs; # ... and non-module files
my $module = $path->relative($dir); # get relative path...
$module =~ s{ \.pm \z}{}gmxs; # ... and transform it...
$module =~ s{/}{::}gmxs; # ... into a module name
require_ok($module)
or BAIL_OUT("can't load $module");
} ## end while (my $path = $iter->...)
diag("Testing WebService::MyJSONs $WebService::MyJSONs::VERSION");
done_testing();