Skip to content

Commit

Permalink
Test "at least" version for optional modules
Browse files Browse the repository at this point in the history
  • Loading branch information
pmqs committed Oct 22, 2020
1 parent 310b8c2 commit 38d2da2
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions t/000prereq.t
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,20 @@ BEGIN
}
else
{
my $ver = eval("\$${name}::VERSION");
is $ver, $VERSION, "$name version should be $VERSION"
or diag "$name version is $ver, need $VERSION" ;
eval " use $name $VERSION " ;

if ($@)
{
my $ver = eval("\$${name}::VERSION");

ok 0, "$name version should be $VERSION"
or diag "$name version is $ver, need $VERSION" ;
}
else
{
ok 1, "$name is $VERSION" ;
}

}
}

Expand Down

0 comments on commit 38d2da2

Please sign in to comment.