in reply to On Windows, With StrawberryPerl, Module::Build::Tiny fails to install a module

your link to Readonly was bad

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


edit 1: added perl -MReadonly example, to show it's actually installed and perl can find it

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

    Hi pryrt, this may be a premature reply but I didn't want to get caught up something else, and neglect to acknowledge a really exemplary bit of helpfulness.

    pryrt wrote:

    Module::Install::Tiny doesn't exist; I think you mean Module::Build::Tiny, as that's what Readonly's Build.pl needs.

    Erm, yes, exactly. My bad. Module::Build::Tiny. I'm working on installing Readonly in exactly the way you showed above, and bizarrely it (cpanm) is just hanging. Well over 3 minutes now. I'm working under CMD.exe, not cygwin bash. I'll probably add to this reply with a later edit once I figure out (if I figure out) what's going wrong.

    Jun 17, 2025 at 01:01 UTC

    I got Readonly installed. I would try to describe the contortions I went through, with CMD.exe changing directory by itself (I know, I know, impossible) and every effort to run .\Build in it thwarted by the process hanging or other things, but I don't think most readers would believe me. I finally had to wipe out the build directory for Readonly and start from scratch with cpanm as you showed. I did that in a cygwin bash shell since I was just fed up with CMD.exe behaving as if it had lost its mind.

    I got strongly motivated to work out how to be in a cygwin shell but be using win32 reliably and have this figured out now and I really appreciate the help I been given in this thread.

    Jun 17, 2025 at 23:50 UTC