Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Can anyone find me a compelling argument not to do this Tongue-in-cheek answers: Because having another module to do "system" doesn't actually make things simpler? Because having yet another special case of how things work on Windows doesn't make things simpler? In seriousness, I'm all for better portability and a friendlier API than "system", but this has been attempted so many times that I'd really rather see an attempt to bring together the best insights or try to merge new insights into one of the stronger existing modules than see an attempt to create yet another "special case". (See module list that follows.) Personally, I tend to favor IPC::Run3, but only because I've used it the most and had few problems with it across unix and Win32. Moreover, attempting to emulate Unix "system" behavior on Win32 strikes me as potentially quite tricky given all the special cases that had to be built into "system" on Win32 in the first place. For example, you suggest that a multi-arg list never be passed to the shell. So how would you replace/handle this call to "system":
On Win32, echo is a built-in command and has to be passed to cmd.exe and "%PATH%" does environment variable expansion (at some point anyway -- I think on the command line, but I'm not entirely sure. That works with "system" but I don't think it necessarily would with your "run" in IPC::System::Simple. Anyway, as you develop these ideas further, I encourage you to post them on http://win32.perl.org so that all may benefit. c.f other docs and modules (including ones I know and others that I just found searching on CPAN):
-xdg Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk. In reply to Re: RFC: IPC::System::Simple under Win32
by xdg
|
|