1package My::Test::Class::Load; 2 3use strict; 4use warnings; 5 6use base 'Test::Class::Load'; 7 8sub is_test_class { 9 my ($class, $file, $dir) = @_; 10 11 return if !$class->SUPER::is_test_class($file, $dir); 12 13 if (exists $ENV{TEST_CLASS}) { 14 my $pattern = $ENV{TEST_CLASS}; 15 16 (my $class = $file) =~ s!^\Q$dir\E/!!xms; 17 $class =~ s/\.pm$//xms; 18 $class =~ s!/!::!gxms; 19 20 return if $class !~ /$pattern/xms; 21 } 22 23 return 1; 24} 25 261; 27__END__ 28