Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I do not see anything in the Windows specific notes you linked to that documents when, or even if it tries, to distinguish shell built-in commands from external executables?

Unless you include "The capture subroutine always returns the 32-bit exit value under Windows. The capture subroutine also never uses the shell, even when passed a single argument.", which seems like a very ... um .. short-sighted policy.

Whilst there are a few specific time when you want to avoid using the shell for application specific pragmatic reasons; doing so at all times and at all costs is dogmatic and unjustifiable.

This is another of those occasions where IMO, the attempt to provide cross-platform compatibility is being applied at too low a level. The way OSs, and particularly shells, do their thing is necessarily sufficiently different, that trying to abstract at that level is bound to end in unacceptable compromises at best; and unworkable failure the rest of the time.

The alternative is that programs abstract system calls at a higher level. That is, at the 'perform this particular OS function" level:

my $resultFromExternalSource; if( $^O eq 'MSWin32' ) { $resultFromExternalSource = win32GetFromExternalSource( ... ); } elsif( $^O eq 'linux' ) { $resultFromExternalSource = linuxGetFromExternalSource( ... ); } elsif( $^O eq 'VMS' ) { $resultFromExternalSource = ...; } elsif ...

The lower the level you try to abstract something at, more more likely the 'lowest-common-denominator' requirement will compromise the possibilities.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?


In reply to Re^5: autodie and IPC::System::Simple on Windows by BrowserUk
in thread autodie and IPC::System::Simple on Windows by JohnRS

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • 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.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-19 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found