A set of quoting modules for different shells (Bourne, csh, MS, etc.) is included as part of my module Net::OpenSSH, and it is a can of worms.

As part of the test suite, random strings are generated, quoted and parser by the set of supported shells found by the module in every computer where the tests are run. Over the years I have received a good number of bug reports related to that, most of the times caused by bugs or by unexpected behaviors in the shells, specially for commercial vendors maintaining their code in isolation (for instance, IIRC, AIX ksh).

So, String::ShellQuote may have its issues, and retrospectively some of them probably just caused by bad design decisions, but it should also be taken into consideration that the complexity of the problem it tries to solve is not negligible.


In reply to Re: Problems with String::ShellQuote by salva
in thread Problems with String::ShellQuote by afoken

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.