te_args => (
is=>'rw',
default => 1,
);
my $formats = [qw/text text-simple text-pretty json json-pretty csv termtable html html+datatables perl vd/];
sub BUILD {
my ($self, $args) = @_;
schema => ['str*' => in => $formats],
};
$copts->{json} = { $_copy->('json'), };
$copts->{naked_res} = { $_copy->('naked_res'), };
$
$self->{common_opts} = $copts;
}
$self->{formats} //= $formats;
$self->{per_arg_json} //= 1;
}
my $setup_progress;
sub _setup_progress_output {
my $self = shift;
return unl
{format} = $co->{format}{default} if $co->{format};
# EXPERIMENTAL, set default format to json if we are running in a pipeline
# and the right side of the pipe is the 'td' program
{
$pipeinfo->{cmdline} =~ m!\A([^\0]*[/\\])?perl\0([^\0]*[/\\])?td\0!;
$r->{format} = 'json';
}
$r->{format} //= $self->cmdline->default_format;
if ($self->cmdline->read_confi
wn_opts => (is=>'rw', default=>0);
has pass_cmdline_object => (is=>'rw', default=>0);
has per_arg_json => (is=>'rw');
has per_arg_yaml => (is=>'rw');
has program_name => (
is=>'rw',
default =>
is => 'rw',
lazy => 1,
default => sub {
require Data::Clean::ForJSON;
Data::Clean::ForJSON->get_cleanser;
},
);
has use_cleanser => (is=>'rw', default=>1);
has extra_ur
},
format => {
getopt => 'format=s',
summary => 'Choose output format, e.g. json, text',
description => <<'_',
Output can be displayed in multiple formats, and a suitabl