diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/feature-check.pl | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/bin/feature-check.pl b/bin/feature-check.pl index 2c36d81..e6f3514 100755 --- a/bin/feature-check.pl +++ b/bin/feature-check.pl @@ -65,6 +65,8 @@ my @OPT = (); feature-check [OPTION...] + feature-check --format graphviz | fdp -Tx11 + =head1 DESCRIPTION B<feature-check> is a command-line tool @@ -76,6 +78,25 @@ based on coverage and embedded annotations of its documentation. =head1 OPTIONS +=head2 Rendering + +=over 16 + +=item B<--format> + +Output format, either of I<table> I<ascii> I<ansi> I<svg> I<graphviz> +S<(default value: I<ansi>)> + +=back + +=cut + +push @OPT, qw( + format=s +); + +$OPT{'format'} = 'ansi'; + =head2 General =over 16 @@ -181,9 +202,14 @@ my $table = Term::Table->new( rows => \@row, ); -say $_ for $table->render; - -print $graph->as_boxart(); +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'; + default { $log->fatal("unsupported format:$_") && exit 1 } +} $log->error($_) for $graph->errors(); $log->warn($_) for $graph->warnings(); |