develooper Front page | perl.perl5.porters | Postings from February 2003

Can we limit line length to something longer than 200 chars in pm_to_blib()?

Thread Next
Barrie Slaymaker
February 27, 2003 00:11
Can we limit line length to something longer than 200 chars in pm_to_blib()?
Message ID:
The below patch reduces quite significantly the time "make test" takes
on my system for distributions with around 50 files in lib/... because
firing up perl -MExtUtils::MM_Unix -e 1 takes 0.2 to 0.3 seconds and doing
it 8 times for each make test (from one dist I work with frequently)
adds up.  The patch cust make test from 5 seconds to less than 2.
Sounds like a small increase, but I run tests very frequenty (via
Test::Verbose's tv command).

I'm not sure what an acceptable solution is here, but limiting line
length to 200 characters on all systems seems overly conservative and
detunes the testing mechanism enough to gently deter people from running
tests frequently.

Limiting line length to 20000 is just an easy number for demonstration
purposes; personally, I liked 5.6.1's behavior of unlimited line length
better, but there is some magic number for each system and it's very,
very big (relative to 200 :) on Linux.

How can a real number for line length be determined, or can we avoid
line length entirely and pass the hash in through STDIN?  If it can't
be, I'll submit a patch to MM* to let the user determine this so testing
wonks like myself can blow out the limits where appropriate ;).

Also, why not have MM_*.pm generate a ruleset like:

    pm_to_blib: $(TO_INST_PM) blib/lib/
            @$(TOUCH) $@

    blib/lib/ lib/
           @$(PERLRUNINST) "-MExtUtils::Install" \
           -e "pm_to_blib({qw{lib/ blib/lib/}},'$(INST_LIB)/auto','$(PM_FILTER)')"

and let make(1) do what make(1) is supposed to do?

- Barrie

---	2003-02-27 04:07:57.000000000 -0500
+++	2003-02-27 04:08:02.000000000 -0500
@@ -3110,7 +3110,7 @@
     while (my ($pm, $blib) = each %pm_to_blib) {
 	my $la = length $pm;
 	my $lb = length $blib;
-	if ($l + $la + $lb + @a / 2 > 200) { # limit line length
+	if ($l + $la + $lb + @a / 2 > 20000) { # limit line length
 	    _pm_to_blib_flush($self, $autodir, \$r, \@a, \$l);
         push @a, $pm, $blib;

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About