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

In the Build.PL protocol, verbose takes an optional argument (typically set to the value 1), so
./Build --verbose test
equals
./Build --verbose=test
That's why you should generally do
./Build test --verbose
I agree it's not ideal, but that's a decision that was made 20+ years ago.
  • Comment on Re: On Windows, With StrawberryPerl, Module::Build::Tiny fails to install a module
  • Download Code

Replies are listed 'Best First'.
Re^2: On Windows, With StrawberryPerl, Module::Build::Tiny fails to install a module
by ikegami (Patriarch) on Jun 17, 2025 at 17:56 UTC

    While your solution is correct, your explanation isn't.

    If it was the problem that test is absorbed as a value for --verbose, then Build --verbose=1 test would work.

    The actual problem appears to be the order of the arguments, which I already mentioned.

      You are right, there is also an ordering issue. I could fix that, though the Build.PL spec only requires the current order. I'm not sure yet if I should change this. Also, in general people should pass their options in the configuration stage anyway.
Re^2: On Windows, With StrawberryPerl, Module::Build::Tiny fails to install a module
by RareElement (Acolyte) on Jun 17, 2025 at 21:04 UTC
    That's what I initially assumed the issue was, but instead it seems that Module::Build::Tiny is sensitive to the order of arguments, as ikegami noted. Seems like a bug that even supplying an explicit "--verbose=1" doesn't have the intended to effect. Module::Build proper, on the other hand, seems much more lenient:
    ./Build --verbose test
    ./Build --verbose=1 test
    
    Both of those work.
      Module::Build proper, on the other hand, seems much more lenient:
      Module::Build proper uses a bespoke argument parser that includes heuristics to guess if it should take the argument (e.g. ./Build --verbose 1 test). Module::Build::Tiny just uses Getopt::Long like a normal Perl program. There are actually more behaviors that Module::Build's argument parser allows that Module::Build::Tiny doesn't do. MBT always went for a subset of behaviors because the full set was too large and unpredictable.