develooper Front page | perl.perl5.porters | Postings from September 2009

Make makedef.pl build the command line from its own @INC

Thread Next
From:
Max Maischein
Date:
September 24, 2009 12:35
Subject:
Make makedef.pl build the command line from its own @INC
Message ID:
4ABBC9ED.9060409@corion.net
Hello again, p5p!

Currently, makedef.pl hardcodes lib/ when it runs $^X to output 
variables from Config.pm. This is bad, because on Windows, it is run 
from win32/ instead. The attached patch lets makedef.pl build the 
command line dynamically by adding all of @INC as -I switches.

This patch relies on the fact that the Perl distribution and build 
process will never contain fancy filenames.

This patch also adds error checking for the case that

   `$^X $opts $incs -V`

returns empty output, which was the case with todays build.

Nick mentioned that a nicer long-term approach would be to avoid 
shelling out to ourselves and make all interesting values accessible
from the Perl level directly.

-max

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About