mpFile('MYMETA.yml', $meta);
}
sub write_mymeta_json {
my $self = shift;
# We need JSON to write the MYMETA.json file
unless ( eval { require JSON; 1; } ) {
return 1;
}
# Generate the data
ta or return 1;
# Save as the MYMETA.yml file
print "Writing MYMETA.json\n";
Module::Install::_write(
'MYMETA.json',
JSON->new->pretty(1)->canonical->encode($meta),
);
}
sub _write_mymeta_da
lt => 1,
'File::ShareDir' => '1.00',
);
features(
'JSON support', [
-default => 0,
'JSON' => '2.00',
'JSON::XS' => '2.00',
],
'YAML support', [
'YAML' => '
r an
L<Inline>-based module. This writes C<Makefile>, C<META.yml>, and
C<MYMETA.yml> (or C<MYMETA.json>) if you set an experimental
environmental variable C<X_MYMETA>.
=head2 WriteMakefile (L<Module:
mymeta_json (L<Module::Install::Metadata>)
write_mymeta_yaml;
write_mymeta_json;
B<write_mymeta_yaml> command and B<write_mymeta_json> command are to
write C<MYMETA.yml> and C<MYMETA.json> respe
Experimental support for MYMETA
if ( $ENV{X_MYMETA} ) {
if ( $ENV{X_MYMETA} eq 'JSON' ) {
$self->Meta->write_mymeta_json;
} else {
$self->Meta->write_mymeta_yaml;
}
}
return 1;
}
1;