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

Re: Make build the command line from its own @INC

Thread Previous | Thread Next
Nicholas Clark
September 24, 2009 12:50
Re: Make build the command line from its own @INC
Message ID:
On Thu, Sep 24, 2009 at 09:35:09PM +0200, Max Maischein wrote:
> Hello again, p5p!
> Currently, hardcodes lib/ when it runs $^X to output 
> variables from This is bad, because on Windows, it is run 
> from win32/ instead. The attached patch lets build the 
> command line dynamically by adding all of @INC as -I switches.

Would it also work to do

    $ENV{PERL5LIB} = join $Config{path_sep}, @INC;

before the ``?

That was the approach I took in, and feels a bit more robust,
as it should cope with any legal filename on the platform in question.
(Except for anyone who puts ':' in a directory name on Unix. Or anywhere with
shorter limits on environment variable length than command line length)

Nicholas Clark

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