Skip Menu |

This queue is for tickets about the Unicode-UTF8 CPAN distribution.

Report information
The Basics
Id: 121079
Status: resolved
Priority: 0/
Queue: Unicode-UTF8

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.62



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:

+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 )

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 )

For example, on a box where I haven't installed Test::Fatal yet,

cpanm  Unicode::UTF8
--> Working on Unicode::UTF8
Fetching http://www.cpan.org/authors/id/C/CH/CHANSEN/Unicode-UTF8-0.61.tar.gz ... OK
Configuring Unicode-UTF8-0.61 ... N/A
! Configure failed for Unicode-UTF8-0.61. See /home/kent/.cpanm/work/1491941802.24241/build.log for details.

Which is silly, seeing the previous version works just fine:

 cpanm  Unicode::UTF8@0.60
--> Working on Unicode::UTF8
Fetching http://backpan.perl.org/authors/id/C/CH/CHANSEN/Unicode-UTF8-0.60.tar.gz ... OK
Configuring Unicode-UTF8-0.60 ... OK
==> Found dependencies: Test::Fatal
--> Working on Test::Fatal
Fetching http://backpan.perl.org/authors/id/R/RJ/RJBS/Test-Fatal-0.014.tar.gz ... OK
Configuring Test-Fatal-0.014 ... OK
Building and testing Test-Fatal-0.014 ... OK
Successfully installed Test-Fatal-0.014
Building and testing Unicode-UTF8-0.60 ... OK
Successfully installed Unicode-UTF8-0.60
2 distributions installed
 




-- 
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
 

Thank you for your report, this has been addressed in v0.62.