Skip to content

Commit

Permalink
diagnostic test
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Aug 23, 2016
1 parent eea2d23 commit e10c693
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions t/00-versions.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
use strict;
use warnings;
use List::Util;

print "1..1\n";

for my $mod (qw(List::Util List::Util::PP List::Util::XS Scalar::Util Sub::Util)) {
no strict 'refs';
my $v = ${$mod.'::VERSION'} || '';
my $e = join(', ', sort @{$mod.'::EXPORT'});
my $eo = join(', ', sort @{$mod.'::EXPORT_OK'});
my $ef = join(', ', sort @{$mod.'::EXPORT_FAIL'});
my $s = join(', ', sort grep !/::$/ && defined &{$mod.'::'.$_}, keys %{$mod.'::'});
s/(?:^|\G)(?=.{64})(.{1,63}\S|\S+)\s+/$1\n /gms
for $e, $eo, $ef, $s;
warn sprintf <<'END_REPORT', $mod, $v, $e, $eo, $ef, $s;
%s:
$VERSION: %s
@EXPORT: %s
@EXPORT_OK: %s
@EXPORT_FAIL: %s
subs: %s
END_REPORT
}

print "ok 1\n";
exit 0;

0 comments on commit e10c693

Please sign in to comment.