G'day haukex,

"Just a small nitpick: on Windows it is almost impossible to avoid the shell."

I checked out that module's documentation and code not so long; I've just checked again. Both are still very clear that capturex() does not invoke the shell. Here's a selection of extracts (non-exhaustive):

From SYNOPSIS:

# As above, but NEVER invokes the shell. my $output = capturex("some_command", @args);

From source, starting at Line 361 (note the "NO_SHELL"):

# capturex() is just like backticks/qx, but never invokes the shell. sub capturex { ... if (WINDOWS) { return _win32_capture(NO_SHELL, $valid_returns, $command, +@args); }

Are you possibly confusing capturex() with capture()? Same source, starting at Line 220 (note the "USE_SHELL"):

# capture is our way of running a process with backticks/qx semantics sub capture { ... if (WINDOWS) { # USE_SHELL really means "You may use the shell if you nee +d it." return _win32_capture(USE_SHELL, $valid_returns, $command) +; }

If not a case of confusion, do you think the documentation, code, or something else, is wrong?

All links and extracts are from the IPC-System-Simple-1.30 distribution (released "Mar 24, 2020").

— Ken


In reply to Re^3: use of Backticks to catch console output by kcott
in thread use of Backticks to catch console output by Takamoto

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.