Intrepid has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks. I would like some help gaining insight on this one. I've just been installing dependency dists for a CPAN module and one of them fails the make install step. Tracing the action, I see this dangling off the end of the usual processing:

Appending installation info to D:/AllSBP\lib\perl5\MSWin32-x64-multi-t +hread/perllocal.pod destdir=; \ test -n "$destdir" && destdir="-d $destdir"; \ create-modulino.pl -m Module::ScanDeps::FindRequires \ -a find-requires $destdir -b D:/AllSBP\bin 'destdir' is not recognized as an internal or external command, operable program or batch file. gmake: *** [makefile:1006: install] Error 1
The Makefile statements that generate that look like this:
# --- MakeMaker postamble section: #-*- mode:makefile; -*- postamble :: install:: destdir=$(DESTDIR); \ test -n "$$destdir" && destdir="-d $$destdir"; \ create-modulino.pl -m Module::ScanDeps::FindRequires \ -a find-requires $$destdir -b $(INSTALLSITESCRIPT) # End.

Oh, you'd like to know which distribution this is? Of course. It's Module::ScanDeps::Static v1.7.6.

I imagine this is a very cool thing when it works (haven't tried it on Gnu/Linux yet). My perl setup is:

osname=MSWin32 osvers=10.0.26100.4652 archname=MSWin32-x64-multi-thread uname='Win32 strawberry-perl 5.42.0.1 # 05:37:25 Fri August 01 2025 x64'

I know the "blah blah is not recognized as an internal or external ..." is classic Windows, often useless in diagnosing what's really going on. This scrap of shell script has me confused though, especially destdir="-d $$destdir". Dunno what that does.

Although we don't see the absence of the create-modulino.pl command in the output, it isn't in the package files and isn't installed anywhere on my PATH.

Hope I am not wasting anyone's time. :-)
Sep 24, 2025 at 21:09 UTC

A just machine to make big decisions
Programmed by fellows (and gals) with compassion and vision
We'll be clean when their work is done
We'll be eternally free yes, and eternally young
Donald Fagen —> I.G.Y.
(Slightly modified for inclusiveness)

Replies are listed 'Best First'.
Re: create-modulino.pl appears in a CPAN module Makefile.PL, and nukes the install retval
by ikegami (Patriarch) on Sep 25, 2025 at 04:15 UTC

    make is executing the following:

    destdir=; \ test -n "$destdir" && destdir="-d $destdir"; \ create-modulino.pl -m Module::ScanDeps::FindRequires \ -a find-requires $destdir -b D:/AllSBP\bin

    This is a sh command, but it's being passed to cmd to an unsurprising result.

    C:\>destdir=; \ 'destdir' is not recognized as an internal or external command, operable program or batch file.

    This module's installer isn't portable.

      How comes the testers are fine on MSWin32 and the Makefile.PL doesn't mention destdir at all?

      Update: Added ".PL".

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

        I see. I thought the OP was saying the bit was in Makefile.PL, not Makefile.

        The problem is still that a Makefile for unix was generated. Since the testers say it's fine, I'm going to assume it's not File::ShareDir::Install that's non-portable either. Then I suspect some mixes of two OSes was used to build this Makefile. Cygwin, MSYS or MSYS2 was involved. Don't use a unix emulation when you want to install something for Windows.

      ikegami wisely surmised:

      This is a sh command, but it's being passed to cmd to an unsurprising result.

      Having slept on it, I have come to the conclusion that what you say is correct.

      This module's installer isn't portable.

      Yes–no, it's not portable. I thought I had the kinks worked out of my setup and that win32 perl would handle sh commands but obviously I have not. I'll have to decide how much effort to put into solving that, since I've watched dozens of successful installs from CPAN recently, and this is just one exceptional failure.

          — Soren

      Sep 25, 2025 at 16:34 UTC
        If the normal behavior with strawberry is that make commands use cmd, not sh, there may be already fixed distros that rely on that (checking os in Makefile.PL). Futzing your setup to make this one work would then break those; better to just see it as a bug in this distro and change nothing in your setup.