in reply to Re^6: Poll: Is your $^X an absolute path? (system @list)
in thread Poll: Is your $^X an absolute path?
assume the user provided a valid command line on the current platform
Which translates to "avoid portability". I strongly disagree.
Look at existing attempts to provide portability with command lines in Perl. Several Perl subsystems compose lists of which command to use to do which task and then expect system($command{copy},$from,$to) to work. That is quite reasonable. Too bad it doesn't work very well on Win32. But that is because system(@list) has always been broke on Win32, depriving an important tool for dealing with command lines portably in Perl.
Unfortunately, we can't make system(@list) work portably for all Win32 commands but we can make it work portable for most commands, and we should do that.
But you do remind me of a point that I had previous included in my proposal but that I didn't include in the one I linked to. We should probably not add quotes if there are already quotes around the argument. I can see advantages to either way so perhaps it should be an option, but the default should be to avoid adding quotes if they are already there.
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Poll: Is your $^X an absolute path? (system @list)
by xdg (Monsignor) on Aug 18, 2006 at 14:51 UTC | |
by BrowserUk (Patriarch) on Aug 18, 2006 at 15:07 UTC | |
by tye (Sage) on Aug 18, 2006 at 15:21 UTC | |
by BrowserUk (Patriarch) on Aug 18, 2006 at 15:28 UTC | |
by tye (Sage) on Aug 18, 2006 at 15:40 UTC | |
by tye (Sage) on Aug 18, 2006 at 15:13 UTC | |
by xdg (Monsignor) on Aug 18, 2006 at 16:08 UTC | |
by tye (Sage) on Aug 18, 2006 at 16:37 UTC |