href containing the metadata about this distribution that will be
#pod stored in META.yml or META.json. You should not alter the metadata in this
#pod hash; use a MetaProvider plugin instead.
#pod
#p
::Plugin::AutoPrereqs>,
#pod L<MetaYAML|Dist::Zilla::Plugin::MetaYAML>,
#pod L<MetaJSON|Dist::Zilla::Plugin::MetaJSON>,
#pod ...
#pod
#pod =back
#pod
#pod =item *
#pod
#pod On the CPAN:
#pod
#pod =ove
a hashref containing the metadata about this distribution that will be
stored in META.yml or META.json. You should not alter the metadata in this
hash; use a MetaProvider plugin instead.
=head2 prer
table
#pod for piping into F<cpanm>.
#pod
#pod =head2 --json
#pod
#pod Lists all prerequisites in JSON format, as they would appear in META.json
#pod (broken out into phases and types)
#pod
#pod =head
g' ],
[ 'cpanm-versions', 'format versions for consumption by cpanm' ],
[ 'json', 'list dependencies by phase, in JSON format' ],
[ 'omit-core=s', 'Omit dependencies that are shipped with the sp
if($opt->json) {
my $prereqs = $self->prereqs($self->zilla);
$prereqs = filter_core($prereqs, $omit_core) if $omit_core;
my $output = $prereqs->as_string_hash;
require JSON::MaybeXS;
package Dist::Zilla::Plugin::MetaJSON 6.036;
# ABSTRACT: produce a META.json
use Moose;
with 'Dist::Zilla::Role::FileGatherer';
use Moose::Util::TypeConstraints;
use Dist::Zilla::Pragmas;
use names
pace::autoclean;
#pod =head1 DESCRIPTION
#pod
#pod This plugin will add a F<META.json> file to the distribution.
#pod
#pod This file is meant to replace the old-style F<META.yml>. For more informati
erated
#pod file. It defaults, of course, to F<META.json>.
#pod
#pod =cut
has filename => (
is => 'ro',
isa => 'Str',
default => 'META.json',
);
#pod =attr version
#pod
#pod This parameter l
are not part of the distribution.
#pod It does this by adding a C<no_index> block to your F<META.json> (or
#pod F<META.yml>) file in your distribution.
#pod
#pod =for Pod::Coverage mvp_aliases mvp_mu
, and are not part of the distribution.
It does this by adding a C<no_index> block to your F<META.json> (or
F<META.yml>) file in your distribution.
=head1 PERL VERSION
This module should work on any
e =~ /\A_Inline/;
return 1 if $file->name eq 'MYMETA.yml';
return 1 if $file->name eq 'MYMETA.json';
return 1 if $file->name eq 'pm_to_blib';
return 1 if substr($file->name, 0, 6) eq '_eumm/';
Dist::Zilla::Role::MetaProvider 6.036;
# ABSTRACT: something that provides metadata (for META.yml/json)
use Moose::Role;
with 'Dist::Zilla::Role::Plugin';
use Dist::Zilla::Pragmas;
use namespace::a
-8
=head1 NAME
Dist::Zilla::Role::MetaProvider - something that provides metadata (for META.yml/json)
=head1 VERSION
version 6.036
=head1 DESCRIPTION
This role provides data to merge into the di
_HASH0);
use JSON::MaybeXS;
use Scalar::Util qw(blessed);
use Test::Deep ();
use YAML::Tiny;
use Sub::Exporter -setup => {
exports => [
is_filelist =>
is_yaml =>
is_json =>
0], $want, $comment);
}
#pod =func is_json
#pod
#pod is_json( $json_string, $want_struct, $comment );
#pod
#pod This test assertion deserializes the given JSON string and does a
#pod C<L<cmp_deeply
_deeply>>.
#pod
#pod =cut
sub is_json {
my ($json, $want, $comment) = @_;
my $have = JSON::MaybeXS->new(ascii => 1)->decode($json)
or die "Cannot decode JSON";
local $Test::Builder::Level