From: Graham Knop Date: Sun, 23 Apr 2017 21:23:54 +0000 (+0200) Subject: prereq report test X-Git-Tag: v0.32~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=commitdiff_plain;h=712235202a9cc46d4d5efa86a7f40c64771f9498 prereq report test --- diff --git a/t/00-report-prereqs.t b/t/00-report-prereqs.t new file mode 100644 index 0000000..bea2668 --- /dev/null +++ b/t/00-report-prereqs.t @@ -0,0 +1,40 @@ +use strict; +use warnings; + +if (!eval { require ExtUtils::MakeMaker }) { + print "1..0 # SKIP ExtUtils::MakeMaker not available\n"; + exit 0; +} + +print "1..1\n"; +print "ok 1\n"; +print STDERR "#\n# Optional Prereq Versions:\n"; +for my $module (qw( + Config::General + Config::Tiny + Cpanel::JSON::XS + JSON::MaybeXS + JSON::DWIW + JSON::XS + JSON::Syck + JSON::PP + JSON + XML::Simple + XML::NamespaceSupport + YAML::XS + YAML::Syck + YAML +)) { + my $file = "$module.pm"; + $file =~ s{::}{/}g; + my ($full_file) = grep -e, map "$_/$file", @INC; + my $v; + if (defined $full_file) { + $v = MM->parse_version($full_file); + } + else { + $v = 'missing'; + } + printf STDERR "# %-25s %s\n", $module, $v; +} +print STDERR "#\n";