Using Win32::GetShortPathName() is a band-aid solution, but since this problem only seems to come up rarely and then only on Windows it should hold. I'd rather either do the shell escaping or use something that doesn't invoke a shell.
Cross-platform shell escaping is a ROYAL PAIN IN THE ASS as I'm finding out in MakeMaker. This is an old, old, old problem which was simply left to rot because its so difficult to get right. ActiveState simply worked around the problem by moving the default install location from C:\Program Files\Perl to C:\Perl.
Using open | doesn't please me but it seems to be the only cross-platform, backwards compatible thing to do. Can't use any whizz-bang 5.8.0 features, this thing has to work back to 5.4.0.
--
Michael G Schwern Just Another Stupid Consultant
schwern@pobox.com http://www.pobox.com/~schwern/
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|