perl -MTest::AutoPlan -e0 t/*
####
use Test::More ( ... );
...
####
use Test::AutoPlan qw( Test::More ... );
...
####
use Test::AutoPlan 23 qw( Test::More ... );
...
####
my $plan;
sub VERSION {
$plan = $_[1];
}
sub import {
my $self = shift(@_);
goto &UpdateTests if ! @_;
my $module = shift(@_);
my @plan = "no_plan";
if( defined($plan) ) {
@plan = ( tests => $plan );
} elsif( "Test::Simple" eq $module ) {
@plan = ( tests => 0 );
}
unshift @_, $module, @plan;
my $import = $module . "::import";
undef $plan;
goto &$import;
}
sub UpdateTests {
for my $test ( @ARGV ) {
my $plan = RunTestsAndCount( $test );
@ARGV = $test;
$^I = ".old";
while( <> ) {
s{
^(
[\w\s]*
(?