Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of chorny (7137)

Thursday December 17, 2009
06:30 PM

Upgrade you Makefile.PL with eumm-upgrade

[ #40032 ]

I decided to celebrate Perl birthday with several new tools. First one is 'eumm-upgrade'.

It can be used to allow using new features of ExtUtils::MakeMaker without losing compatibility with older versions. BUILD_REQUIRES is the main new feature (I wrote it). It is important for ActivePerl ppm files, for META.yml and for OS packages.

eumm-upgrade adds compatibility code to Makefile.PL and tries to automatically detect some properties like license, minimum Perl version required and repository used.

You can install App::EUMM::Upgrade from CPAN. Or just download version 0.21 from Github directly and install from CPAN these modules: File::Slurp Text::FindIndent Github::Fork::Parent ExtUtils::MakeMaker.

To use, run in directory with Makefile.PL. Old file will be copied to Makefile.PL.bak. If you use Github repository, Internet connection is required.

You need to check resulting Makefile.PL manually as transformation is done with regular expressions.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • One major problem we have had in the past is with Scalar::Util [], which has 2 modes: XS mode, and PP mode. The latter did not include the functionality to create weak references, and it was the version that PPM installed. Often, that was precisely the functionality we needed the module for... Yet, the version number of Scalar::Util [] was the same for both... Just requiring a high enough version number for the module did not do any good.

    Can your extension detect that? "We need Scalar::Util [] so and so and it has

    • You have two solutions for this:
      1. (best) Add Task::Weaken [] to BUILD_REQUIRES (or to PREREQ_PM if you don't use eumm-upgrade)
      2. (new solution, may be better with ppm4) Depend on List::Util::XS