Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re^3: Perl6 - Module::Build

by Corion (Pope)
on May 28, 2005 at 20:08 UTC ( #461389=note: print w/replies, xml ) Need Help??

in reply to Re^2: Perl6 - Module::Build
in thread Perl6 - Module::Build

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://461389]
[marinersk]: choroba++
[choroba]: it's a long running test, so it's normally skipped unless an env var is set
[choroba]: nobody has been bothered to set the variable in the last 3 years
[marinersk]: sub newtest{my $expected_result = &target('foo'); my $actual_result = &target('foo'); if ($actual_result eq $expected_result) { &tdd_success(); } else { &tdd_fail(); } } # Test works after three years!
[choroba]: or nobody bothered...
[choroba]: The problem was bigger, as the test tried to call a method that didn't exist anymore
[marinersk]: :: ducking ::
[choroba]: because, someone renamed the method, but didn't notice it was used in the test, as the test was skipped
[marinersk]: Well, if the method doesn't exist, it would be hard to pass the test.
[choroba]: later, someone removed the new method, as all its usage places were safe, but didn't notice the test still used the old name

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2017-05-25 15:08 GMT
Find Nodes?
    Voting Booth?