aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 }
}