Skip to content

Commit

Permalink
Tests: better feedback when alien is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnlaffan committed Jun 1, 2024
1 parent 73949f1 commit 21d27c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion t/00-load.t
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ my @aliens = qw /
Alien::proj Alien::libtiff Alien::spatialite
Alien::freexl
/;
my %optional = map {$_ => 1} qw /Alien::spatialite Alien::freexl/;
my $longest_name = max map {length} @aliens;
foreach my $alien (@aliens) {
eval "require $alien; 1";
if ($@) {
#diag "$alien not installed";
diag sprintf "%-${longest_name}s: not installed", $alien;
my $optional_text = $optional{$alien} ? "(optional module)" : '';
diag sprintf "%-${longest_name}s: not installed $optional_text", $alien;
next;
}
diag sprintf "%-${longest_name}s: version:%7s, install type: %s",
Expand Down

0 comments on commit 21d27c4

Please sign in to comment.