Data-Roundtrip

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


        my $yamlstr = <<'EOS';
        ---
        - 682224
        - "\"w"
        EOS
        # this is OK also:
        # - \"w: 1
        my $pv = eval { YAML::Load($yamlstr) };
        if( $@ ){ die "failed(1): ". $@ }
        # it's OK! still alive.

    I have provided an author-only test (make deficiencies) which tests all
    three of them on the edge cases. Both YAML::PP and YAML::XS pass the
    tests.

    This YAML issue <https://github.com/ingydotnet/yaml-pm/issues/224> is
    relevant. Many thanks to CPAN authors TINITA
    <https://metacpan.org/author/TINITA> and INGY
    <https://metacpan.org/author/INGY> for their work on this, and on YAML*
    too.

README.md  view on Meta::CPAN


    my $yamlstr = <<'EOS';
    ---
    - 682224
    - "\"w"
    EOS
    # this is OK also:
    # - \"w: 1
    my $pv = eval { YAML::Load($yamlstr) };
    if( $@ ){ die "failed(1): ". $@ }
    # it's OK! still alive.

I have provided an author-only test (`make deficiencies`) which
tests all three of them on the edge cases. Both [YAML::PP](https://metacpan.org/pod/YAML%3A%3APP)
and [YAML::XS](https://metacpan.org/pod/YAML%3A%3AXS) pass the tests.

This [YAML issue](https://github.com/ingydotnet/yaml-pm/issues/224) is
relevant. Many thanks to CPAN authors [TINITA](https://metacpan.org/author/TINITA)
and [INGY](https://metacpan.org/author/INGY) for their work on this, and
on `YAML*` too.

a.html  view on Meta::CPAN


<pre><code>my $yamlstr = &lt;&lt;&#39;EOS&#39;;
---
- 682224
- &quot;\&quot;w&quot;
EOS
# this is OK also:
# - \&quot;w: 1
my $pv = eval { YAML::Load($yamlstr) };
if( $@ ){ die &quot;failed(1): &quot;. $@ }
# it&#39;s OK! still alive.</code></pre>

<p>I have provided an author-only test (<code>make deficiencies</code>) which tests all three of them on the edge cases. Both <a>YAML::PP</a> and <a>YAML::XS</a> pass the tests.</p>

<p>This <a href="https://github.com/ingydotnet/yaml-pm/issues/224">YAML issue</a> is relevant. Many thanks to CPAN authors <a href="https://metacpan.org/author/TINITA">TINITA</a> and <a href="https://metacpan.org/author/INGY">INGY</a> for their work ...

<p>For now, the plan is to still use <a>YAML::PP</a> and avoid explicitly requiring <a>YAML::XS</a> until <a>YAML::Any</a> is ready.</p>

<p>Be warned that sub <code>dump2perl()</code> <code>eval()</code>&#39;s its input. If this comes from the user and it is not checked then it is considered a security problem. Subs <code>dump2json()</code>, <code>dump2yaml()</code>, <code>dump2dump()...

<pre><code>use Data::Roundtrip qw/... dump2perl .../</code></pre>

lib/Data/Roundtrip.pm  view on Meta::CPAN


    my $yamlstr = <<'EOS';
    ---
    - 682224
    - "\"w"
    EOS
    # this is OK also:
    # - \"w: 1
    my $pv = eval { YAML::Load($yamlstr) };
    if( $@ ){ die "failed(1): ". $@ }
    # it's OK! still alive.

I have provided an author-only test (C<make deficiencies>) which
tests all three of them on the edge cases. Both L<YAML::PP>
and L<YAML::XS> pass the tests.

This L<YAML issue|https://github.com/ingydotnet/yaml-pm/issues/224> is
relevant. Many thanks to CPAN authors L<TINITA|https://metacpan.org/author/TINITA>
and L<INGY|https://metacpan.org/author/INGY> for their work on this, and
on C<YAML*> too.



( run in 1.371 second using v1.01-cache-2.11-cpan-39bf76dae61 )