App-tchart
view release on metacpan or search on metacpan
script/tchart view on Meta::CPAN
#!perl
use 5.010001;
use strict;
use warnings;
#use App::chart;
use Getopt::Long qw(:config no_ignore_case bundling);
use Scalar::Util qw(looks_like_number);
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2024-02-06'; # DATE
our $DIST = 'App-tchart'; # DIST
our $VERSION = '0.062'; # VERSION
my %Opts = (
input => undef,
output => 'text',
type => 'bar',
script/tchart view on Meta::CPAN
sub get_input {
if (@ARGV) {
$Data = [@ARGV];
return;
}
my @lines = <>;
my $fmt = $Opts{input};
if (!$fmt) {
if (looks_like_number($lines[0]) || $lines[0] =~ /\t/) {
$fmt = "tsv";
} else {
$fmt = "json";
}
}
if ($fmt eq 'tsv') {
$Data = [];
for my $line (@lines) {
chomp $line;
( run in 0.316 second using v1.01-cache-2.11-cpan-64827b87656 )