use warnings;
package Test::Apocalypse::CPANMeta_JSON;
$Test::Apocalypse::CPANMeta_JSON::VERSION = '1.006';
BEGIN {
$Test::Apocalypse::CPANMeta_JSON::AUTHORITY = 'cpan:APOCAL';
}
# ABSTRACT: Plugi
st::CPAN::Meta::JSON 0.10;
# We need to make sure there's actually a JSON file in the dist!
sub _is_disabled {
if ( ! -e 'META.json' ) {
return 'Distro did not come with a META.json file';
}
}
s
_test {
meta_json_ok();
return;
}
1;
__END__
=pod
=encoding UTF-8
=for :stopwords Apocalypse Niebur Ryan
=for Pod::Coverage do_test
=head1 NAME
Test::Apocalypse::CPANMeta_JSON - Plugin for
check for metadata dependencies
use Test::More;
use File::Slurp 9999.13;
use YAML::Any 0.72;
use JSON::Any 1.25;
use File::Find::Rule 0.32;
use Perl::PrereqScanner 1.000;
use Test::Deep 0.108;
use CP
a
my $runtime_req;
my $test_req;
my $provides;
if ( -e 'META.json' ) {
my $file = read_file( 'META.json' );
my $metadata = JSON::Any->new->Load( $file );
$runtime_req = $metadata->{'prereqs'
$provides = $metadata->{'provides'} if exists $metadata->{'provides'};
} else {
die 'No META.(json|yml) found!';
}
# Okay, scan the files
my $found_runtime = CPAN::Meta::Requirements->new;
my
'SIGNATURE' ) {
push( @files, 'SIGNATURE' );
}
# check META.json if it's there
if ( -e 'META.json' ) {
push( @files, 'META.json' );
}
plan tests => ( ( scalar @files ) * 4 ) + ( ( scalar @p