Discussion:
Added META.json and MYMETA.json support to EU::MM
(too old to reply)
David Golden
2011-02-05 20:57:36 UTC
Permalink
I've pushed commits to the Perl Toolchain Gang repo on github that add
support for creating META.json and MYMETA.json files. In addition,
all META file creation now goes through CPAN::Meta to ensure valid,
standardized metafiles.

CPAN::Meta is an optional dependency, so tests that would need it just
skip if not available.

As with my work on Module::Build, the version 2 CPAN Meta files are
just upconversions of version 1.4 data. This gets the ball rolling
with META.json files, without requiring potentially substantial API
revisions that I think are just too risky a couple weeks before the
Perl 5.14 freeze.

Michael -- I think it would be great if we could get a dev version
released this week so we can see how it smokes and then merge it into
blead if it looks decent.

In the meantime, encourage people to try it out from the repository.

-- David
David Golden
2011-02-06 12:52:41 UTC
Permalink
Post by David Golden
CPAN::Meta is an optional dependency, so tests that would need it just
skip if not available.
The change log says this which needs to be discussed.
   INCOMPATIBLE CHANGES
   * META and MYMETA files will only be created if CPAN::Meta is
     installed to ensure consistent and valid META file generation
     [David Golden]
Making it an optional dep on CPAN::Meta will silently make META files
inconsistent on CPAN.  I don't have CPAN::Meta installed.  If I hadn't looked
at the change log I likely wouldn't have noticed until somebody told me my
releases were missing their META files.  One of the reasons the META file
works so well is authors have to do nothing.
It could be a PREREQ_PM and still skip tests if not installed. That
would solve the problem for all but the particular case of a
local::lib bootstrap of a modern EU::MM into a perl before 5.8.9. And
that could be rectified by local::lib also bootstrapping CPAN::Meta
once EU::MM is installed.
Here are the options I see.  First, make it use CPAN::Meta if available and if
not fall back to a built in one.  MakeMaker already has a copy of YAML::Tiny
in ExtUtils::MakeMaker::YAML.  The slightly inconsistent data is better than
no data at all.
No. I'm on a campaign to eradicate copies of YAML::Tiny in core and
have Jesse's support for that. We now have CPAN::Meta::YAML and that
is the standard tool to be used by everything that needs it.
Another option would be to put CPAN::Meta into inc.  Unfortunately, CPAN::Meta
has dependencies.  Can they all be put into inc?  CPAN::Meta::Tiny?
Yes, everything can be put into inc. The only tricky one is
version.pm and even that can have a pure-perl version put there. I
haven't tested it that way, but I'm 95% sure it will work. It bloats
EU::MM's dist a bit, but that's the price of backwards compatibilty.

-- David
David Golden
2011-02-27 12:59:06 UTC
Permalink
I've pushed my work so far into a cpan_meta branch.
https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/commits/cpan_meta
I hit a snag on Storable.  That isn't core until 5.8 and there's no pure Perl
alternative.  Something will have to be done about that.  Thoughts?
I've released CPAN::Meta 2.110580 which removes the dependency on Storable.

-- David

Loading...