aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2022-06-14 15:33:37 +0200
committerJonas Smedegaard <dr@jones.dk>2022-06-14 15:33:37 +0200
commitedc2a884d1bce59b0e2134efcf30084e2d5cf38b (patch)
tree677ccdf5901f54d6ee6b136ad6328d8a5b78ae2b /bin
parentfc06bf8618409d34186fa2091dce2f6ab4ecc9f2 (diff)
tidy use of given/when, and silence warnings
Diffstat (limited to 'bin')
-rwxr-xr-xbin/feature-check.pl11
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/feature-check.pl b/bin/feature-check.pl
index e6f3514..4c1fe24 100755
--- a/bin/feature-check.pl
+++ b/bin/feature-check.pl
@@ -3,6 +3,7 @@
use v5.14;
use utf8;
use warnings;
+no warnings 'experimental::smartmatch';
use open qw( :std :encoding(UTF-8) );
use Getopt::Long 2.24 qw(:config gnu_getopt);
@@ -203,11 +204,11 @@ my $table = Term::Table->new(
);
for ( $OPT{format} ) {
- map { say $_ } $table->render when 'table';
- print $graph->as_ascii() when 'ascii';
- print $graph->as_boxart() when 'ansi';
- print $graph->as_svg() when 'svg';
- print $graph->as_graphviz() when 'graphviz';
+ when ('table') { map { say $_ } $table->render }
+ when ('ascii') { print $graph->as_ascii() }
+ when ('ansi') { print $graph->as_boxart() }
+ when ('svg') { print $graph->as_svg() }
+ when ('graphviz') { print $graph->as_graphviz() }
default { $log->fatal("unsupported format:$_") && exit 1 }
}