in reply to Perl6 - Module::Build

Since you're going pure Perl, please don't repeat the mistake of Module::Build of not having a dry-run and no trace of attempted/failed steps. make -n tells me in great detail what it will try, and make itself tells me what it tried and how it failed. Both are very necessary when debugging the installation.

Update: Another important addition are two hard rules for the Perl code:

A good way for that might be specialized functions like prompt_path and prompt_executable, that implement the looping themselves.

Replies are listed 'Best First'.
Re^2: Perl6 - Module::Build
by autarch (Hermit) on May 27, 2005 at 21:04 UTC

    You make it sound as if Module::Build is somehow coded to _not_ allow dry runs. I don't think this was a design decision Ken made, it's simply not in the code base at present.

    There is a "fakeinstall" build target you can use to get a partial dry run (just of the parts done by ExtUtils::Install, aka module installation). I'm sure patches are welcome to expand dry-run functionality ;)

Re^2: Perl6 - Module::Build
by dragonchild (Archbishop) on May 28, 2005 at 19:59 UTC
    • No user interaction without defaults
    • No loops, or at least no possibly infinite loops when the installation is not run interactively

    Could you please elaborate on these points? What situation(s) are you trying to avoid? Those sound like experience-based rules ...


    • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
    • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"

      I run CPAN smoke tests, and the alarm() call has problems on Win32 Perl, so Makefile.PL does not get timed out when doing a CPAN smoke. Both rules have been evolved from the broken Makefile.PL that is the tradition of mod_perl, which dives into an infinite loop asking me for the location of httpd, over and over again, without a default and without user interaction. The subsequently generated long error email (after I kill the runaway process) then gets bounced back to me by x.perl.org in its entirety because it's too large.

      To prevent authors of Makefile.PL from doing these stupid steps, I came up with these rules.

      The first rule makes authors think about providing sensible defaults or even making the Makefile.PL actively search instead of always asking the user. This is a passive measure to make Makefile.PL find things even in absence of guidance by a user.

      The second rule actively prevents authors from writing potentially infinite loops asking the same question, again and again, without ever getting an answer because there is no user.