use strict;
use warnings;
use Cpanel::JSON::XS 4.19 qw( encode_json );
use Getopt::Long 2.40 qw();
use LWP::UserAgent 5.00;
use Test::Script 1.27 qw(
script_compiles
script_runs
script_st
derr_is
script_stderr_like
);
my $foo = decode_json( { foo => 'bar' } );
my @foo = GetOptions();
script_compiles();
script_runs();
script_stderr_is();
script_stderr_like();
use strict;
use warnings;
use Cpanel::JSON::XS;
my $true_ref = \&Cpanel::JSON::XS::true;
my $false_ref = \&Cpanel::JSON::XS::false;
has _json => (
is => 'ro',
isa => Bool,
lazy => 1,
default => sub {
my $self = shift;
return defined $self->_opts->json
? $self->_opts->json
ignore. One per line.'
],
[],
[
'json',
'(Experimental) Emit linting results as JSON rather than plain text'
],
[],
[
onfig_file };
# The Bool type provided by Types::Standard doesn't seem to like
# JSON::PP::Boolean
for my $key ( keys %config ) {
my $maybe_bool = $config{$key};
s',
);
has json => (
is => 'ro',
isa => Bool,
lazy => 1,
default => 0,
);
has _json_encoder => (
is => 'ro',
isa => InstanceOf ['Cpanel::JSON::XS'],
lazy => 1,
default => sub {
require Cpanel::JSON::XS;
return Cpanel::JSON::XS->new;
},
);
has lint => (
is => 'ro',
isa => Bool,
lazy => 1,
defa
;
my $after = shift;
my $after_deleted = !$after;
my $json;
my $justification;
if ( $self->json ) {
my $loc = { start => { line => $include->line_number } };
e HTTP::Tiny;
use JSON::PP;
use Local::ViaExporter ();
use Test::Builder ();
use POSIX ();
my @foo = List::Util::uniq( 0 .. 10 );
my $bar = encode_json( {} );
my $hr = JSON::PP->new;
local *