In said module (Data::Roundtrip) I have one instance of feeding YAML::PP with a string. As per your suggestion I am now untainting the string thusly:

sub yaml2perl { my $yaml_string = $_[0]; ... ($yaml_string) = each %{{$yaml_string,0}}; my $pv = eval { YAML::PP::Load($yaml_string) }; ... return $pv }

I was previously using YAML but it failed for an (extremely) corner case with a quotes-inside-quotes string. And so I went for YAML::PP as I did not want to use YAML::XS out of concern for users in not dev-friendly environments. YAML::PP does not have a problem with aforementioned corner case.

I had another choice of restricting use of Data::Roundtrip for Perls >= 5.14. But I keep this as last resort.

Any opinions welcome.

Thank Haarg again for looking into this, bw, bliako


In reply to Re^2: Increase verbosity of "make test" by bliako
in thread Increase verbosity of "make test" by bliako

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.