On 2011.2.6 11:52 PM, David Golden wrote:
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 risks a circular dependency loop which I don't trust CPAN installers,
particularly older ones, to gracefully get themselves out of.
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.
META generation has to continue to work, and I agree it would be best to have
everything normalize on one thing.
I went through the process of bundling up all CPAN::Meta's deps into inc.
It's not hard, it's this through the whole tree:
export MAKEMAKER_SRC=/path/to/makemaker/src
export PERL5LIB=$MAKEMAKER_SRC/lib:$MAKEMAKER_SRC/inc/:$MAKEMAKER_SRC/t/lib
perl5.6 Makefile.PL LIB=$MAKEMAKER_SRC/inc/
make test
make install
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?
--
Stabbing you in the face for your own good.