in reply to On Windows, With StrawberryPerl, Module::Build::Tiny fails to install a module
Module::Install::Tiny doesn't exist; I think you mean Module::Build::Tiny, as that's what Readonly's Build.pl needs.
Strawberry perl comes with Module::Build::Tiny:
C:\Users\pryrt\AppData\Local\Temp>perl -MModule::Build::Tiny -e "print + $INC{'Module/Build/Tiny.pm'}" c:/usr/local/apps/strawberry/perl/vendor/lib/Module/Build/Tiny.pm
cpanm handles Build.PL based installations just as well as EUMM installations. Just use cpanm.
Using the cpanm that comes with Strawberry(*):
C:\Users\pryrt\AppData\Local\Temp>cpanm --local-lib=tmplib --test-only + Readonly --> Working on Readonly Fetching http://www.cpan.org/authors/id/S/SA/SANKO/Readonly-2.05.tar.g +z ... OK Configuring Readonly-2.05 ... OK Building and testing Readonly-2.05 ... OK Successfully tested Readonly-2.05 C:\Users\pryrt\AppData\Local\Temp>cpanm --local-lib=tmplib Readonly --> Working on Readonly Fetching http://www.cpan.org/authors/id/S/SA/SANKO/Readonly-2.05.tar.g +z ... OK Configuring Readonly-2.05 ... OK Building and testing Readonly-2.05 ... OK Successfully installed Readonly-2.05 1 distribution installed C:\Users\pryrt\AppData\Local\Temp>perl -Mlocal::lib=tmplib -MReadonly +-e "print $INC{'Readonly.pm'}" Attempting to create directory C:\Users\pryrt\AppData\Local\Temp\tmpli +b C:\Users\pryrt\AppData\Local\Temp\tmplib\lib\perl5/Readonly.pm
Once again, with my setup of Strawberry, I have no problem installing the Readonly module: it tests without failure, it installs without complaint, and when I use it, I can print the path that it shows up in %INC. Everything works as I expect. (I used --local-lib because I don't want to clutter my installation with all the modules that I install to show you that your problem is not Strawberry perl's fault.)
*: Make sure you use where cpanm (the cmd.exe command to show all instances of a given executable in your path, in the order it will be searched) to make sure it's getting the one from your strawberry, not your cygwin. Despite your assurances, your PATH showing all the cygwin prefixes makes me still wonder whether things are as sane as you think they are. And I've never tried running Strawberry perl from a cygwin command line: maybe it will work, but it seems to be an extra layer of confusion that you shouldn't invoke unless you need it.
But, again, it works for me. So I have no clue why it's not for you, and the information you provided is not enough to hazard a guess as to what's going wrong. (Other than your history of having a problematic setup, which you claim cannot be the cause this time.)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: On Windows, With StrawberryPerl, Module::Build::Tiny fails to install a module
by Intrepid (Curate) on Jun 17, 2025 at 01:03 UTC |