Subject: | Please cease with the manual dep check in your Makefile.PL's |
I've noticed you've started injecting this block into your Makefile.PL's, and I'm pretty sure it causes more problems than it solves:
--
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
+BEGIN {
+ unshift @INC, 'inc';
+
+ my @required = (
+ 'inc::Module::Install' => '1.00',
+ 'Module::Install::ReadmeFromPod' => '0',
+ 'Test::More' => '0.47',
+ 'Test::Fatal' => '0',
+ 'Encode' => '1.9801',
+ );
+
+ my @missing;
+ while(my($module, $version) = splice(@required, 0, 2)) {
+ eval qq{use $module $version (); 1}
+ or push @missing, $module;
+ }
+
+ if(@missing) {
+ print qq{# The following modules are not available.\n};
+ print qq{# `perl $0 | cpanm` will install them:\n};
+ s/\A inc:: //x for @missing;
+ print $_, "\n" for @missing;
+ exit 1;
+ }
+}
Importantly, this is because how the CPAN install process works.
1. Install configure_requires deps ( assumes perl > 5.10 as well )
Importantly, this is because how the CPAN install process works.
1. Install configure_requires deps ( assumes perl > 5.10 as well )
2. Execute Makefile.PL
3. Install deps stated in META.* / ( or MYMETA.* on newer perls )
Which means at the time your check runs, there's very little likelihood that the CPAN installers have installed your deps yet, at least, not on a clean install.
And the net result is this code *breaks* installation where it would not be necessary.
And given the installer toolchains already have code for this so it does the right thing?
I can't see this being more than wasted effort :/
Please remove these segments and stop adding them to future dists you maintain.
--
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )