qw/:config gnu_compat/;
use Pod::Usage;
GetOptions(\my %opts, qw(
help|? man verbose dump yaml json colour|color save|to_file dir=s metrics_path=s@
));
pod2usage(1) if $opts{help};
pod2usage(-exit
sult using Data::Dumper
--yaml dump result as YAML
--json dump result as JSON
--save write report (or dump) to a file
--dir
tead of displaying a report text).
=head2 --yaml
Dump the result as YAML.
=head2 --json
Dump the result as JSON.
=head3 --save
Output the result into a file instead of STDOUT.
The name of the f
$opts{no_capture} = 1 if !defined $opts{no_capture};
$opts{dump} = 1 if $opts{yaml} || $opts{json};
if ($opts{metrics_path}) {
Module::CPANTS::Analyse->import(@{$opts{metrics_path}});
return CPAN::Meta::YAML::Dump($thingy);
} elsif ($self->{opts}{json} && eval { require JSON::PP }) {
my $coder = JSON::PP->new->utf8;
$coder->pretty if $pretty;
return $c
st});
}
my $extension =
$self->{opts}{yaml} ? '.yml' :
$self->{opts}{json} ? '.json' :
$self->{opts}{dump} ? '.dmp' :
'.txt';
require File::Spec;
File: