4
# This is a relatively nice way to avoid Test::NoWarnings breaking our
5
# expectations by adding extra tests, without using no_plan. It also helps
6
# avoid any other test module that feels introducing random tests, or even
7
# test plans, is a nice idea.
9
END { $success && done_testing; }
11
# List our own version used to generate this
12
my $v = "\nGenerated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.10\n";
15
# report our Perl details
17
$v .= "perl: $] (wanted $want) on $^O from $^X\n\n";
19
defined($@) and diag("$@");
21
# Now, our module version dependencies:
23
my ($module, $wanted) = @_;
24
$wanted = " (want $wanted)";
26
eval "require $module;";
28
if ($@ =~ m/Can't locate .* in \@INC/) {
29
$pmver = 'module not found.';
31
diag("${module}: $@");
32
$pmver = 'died during require.';
36
eval { $version = $module->VERSION; };
38
diag("${module}: $@");
39
$pmver = 'died during VERSION check.';
40
} elsif (defined $version) {
47
# So, we should be good, right?
48
return sprintf('%-45s => %-10s%-15s%s', $module, $pmver, $wanted, "\n");
51
eval { $v .= pmver('Carp','any version') };
52
eval { $v .= pmver('Exporter','any version') };
53
eval { $v .= pmver('ExtUtils::MakeMaker','6.30') };
54
eval { $v .= pmver('File::Find::Rule::Perl','any version') };
55
eval { $v .= pmver('File::Spec','any version') };
56
eval { $v .= pmver('IO::Handle','any version') };
57
eval { $v .= pmver('IPC::Open3','any version') };
58
eval { $v .= pmver('Module::Metadata','any version') };
59
eval { $v .= pmver('Test::Builder','any version') };
60
eval { $v .= pmver('Test::Exception','any version') };
61
eval { $v .= pmver('Test::More','0.88') };
62
eval { $v .= pmver('Test::Tester','any version') };
63
eval { $v .= pmver('parent','any version') };
64
eval { $v .= pmver('strict','any version') };
65
eval { $v .= pmver('version','0.86') };
66
eval { $v .= pmver('warnings','any version') };
72
Thanks for using my code. I hope it works for you.
73
If not, please try and include this output in the bug report.
74
That will help me reproduce the issue and solve your problem.
79
ok(1, "we really didn't test anything, just reporting data");
82
# Work around another nasty module on CPAN. :/
84
$Template::Test::NO_FLUSH = 1;