On Nov 24, 2007, at 5:00 AM, demerphq wrote:

On Nov 23, 2007 11:36 PM, Matisse Enzer <[EMAIL PROTECTED]> wrote:

I think it is actually
    $CPAN::Perl
and, if the value you use contains any whitespace the entire command
will get quoted, which could break things.

I think this is because the assumption is that the spaces will be due
to spaces in the path (such as on Win32), not spaces due to
command/argument separator.
...

On win32 you would want to quote $^X, as it could very likely (and
annoyingly) resolve to

"C:\program files\perl\bin\perl.exe"

And given that you can create directories with spaces in them on Linux

You are right (and Mac OS X, really any Unix-like system allows spaces and other oddities in file names.)

I think maybe what you really want to do is use the environment
variable PERL5OPT for this instead of messing with $CPAN::Perl.

$ENV{PERL5OPT}='-MINC::Surgery';


Ahh, excellent. thank you. I did not know about PERL5OPT and I think that would be the right choice, except I tried that and it mostly works, but I ran into a problem while my script was building HTML::Tagset.

I did:

       local $ENV{PERL5OPT} = qq{ -I$Bin -MStripNonCorePathsFromINC};

and the  HTMLL::Tagset t/pod.t script fails with:

t/pod...................Can't open perl script " -I/path/to/my/dir - MStripNonCorePathsFromINC": No such file or directory


By the way - having a clean way to install one or more locally created Perl modules with dependencies on public modules is far harder than I wish. Some day maybe it will be a more standardized procedure, perhaps as things like "continuous integration" become more popular.

-M

-------------------------------------------------------
Matisse Enzer <[EMAIL PROTECTED]>
http://www.matisse.net/  - http://www.eigenstate.net/



Reply via email to