Stringify Perl vars so $PERL_VERSION isn't an object. Diag the versions so I can see the real results.

This commit is contained in:
Daniel Nichter
2012-08-08 12:57:47 -06:00
parent 5b5c75ba3b
commit b4dce00639
2 changed files with 5 additions and 2 deletions

View File

@@ -175,9 +175,11 @@ sub get_perl_variable {
# append ::VERSION to get the module's version.
my $var = $item->{vars}->[0] || ($item->{item} . '::VERSION');
my $version = do { no strict; ${*{$var}}; };
PTDEBUG && _d('Perl version for', $var, '=', $version);
PTDEBUG && _d('Perl version for', $var, '=', "$version");
return $version;
# Explicitly stringify this else $PERL_VERSION will return
# as a version object.
return $version ? "$version" : $version;
}
sub get_mysql_variable {

View File

@@ -39,6 +39,7 @@ sub test_v {
items => $items,
dbh => $dbh,
);
diag(Dumper($versions));
is_deeply(
$versions,
$args{versions},