use strict;
use warnings;
package JSON::CPAN::Meta;
our $VERSION = '7.001';
=head1 NAME
JSON::CPAN::Meta - (deprecated) replace META.yml with META.json
=head1 DESCRIPTION
B<Achtung!> This library
will soon be obsolete as tools move to use the
official L<CPAN::Meta::Spec> JSON files.
CPAN distributions contain a file, F<META.yml>, which contains a description of
the distribution and its conte
y simple
and easily understood data format.
JSON, unlike YAML, is lacking in features but is extremely easy to parse and
generate correctly. Further, JSON documents are almost always valid YAML
docu
trict;
use warnings;
package Module::Build::JSONMETA;
BEGIN {
our $VERSION = '7.001';
}
=head1 NAME
Module::Build::JSONMETA - (depreacted) write META.json instead of META.yml
=head1 SYNOPSIS
B<Ach
pec> JSON files.
This interface may be changed in the future if someone with more Module::Build
expertise steps forward.
----- in Build.PL -----
use Module::Build;
use Module::Build::JSONMETA
;
my $class = Module::Build->subclass(
code => Module::Build::JSONMETA->code,
);
my $build = $class->new( ... );
$build->create_build_script;
=cut
my $CODE;
BEGIN {
$CODE = <<'END_C
odule::Install::JSONMETA;
use Module::Install::Base;
BEGIN {
our @ISA = qw(Module::Install::Base);
our $ISCORE = 1;
our $VERSION = '7.001';
}
=head1 NAME
Module::Install::JSONMETA - (depreca
ite META.json instead of META.yml
=head1 ACHTUNG
B<Achtung!> This library will soon be obsolete as EUMM moves to use the
official L<CPAN::Meta::Spec> JSON files.
=cut
our $json;
sub jsonmeta {
my ($self) = @_;
unless (eval { require JSON; JSON->VERSION(2); 1 }) {
die "could not load JSON.pm version 2 or better; can't use jsonmeta\n"
if $self->is_admin;
return; # Not admin,
package ExtUtils::MakeMaker::JSONMETA;
our $VERSION = '7.001';
use ExtUtils::MM_Any;
use JSON 2;
=head1 NAME
ExtUtils::MakeMaker::JSONMETA - (deprecated) write META.json instead of META.yml
=head1
ial L<CPAN::Meta::Spec> JSON files.
In your Makefile.PL:
use ExtUtils::MakeMaker;
eval { require ExtUtils::MakeMaker::JSONMETA; };
WriteMakefile(...);
If EU::MM::JSONMETA cannot be loaded (f
talling your module does not have it or JSON installed), things will
continue as usual. If it can be loaded, a META.json file will be produced,
containing JSON.
=cut
no warnings qw(once redefine);