-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load(Dump($perl)) roundtrip causes errors: escaped double quote #224
Comments
It doesn't surprise me. It seems I could fix it in #225, but no test so far. However, YAML.pm has many more problems, and not all are that easy to fix, or close to impossible without a major rewrite. AFAIK @ingydotnet at some point wants to update the YAML.pm docs, among other things to add a link to YAML::PP. |
I understand, yes it is not important. I am just reporting it and also
reporting the method of randomised (author) tests.
In the YAML documentation I only saw YAML::XS and was a bit reluctant to
use it as a dependency so thanks for YAML::PP
…On 03/10/2023 17:46, Tina Müller (tinita) wrote:
It doesn't surprise me.
It seems I could fix it in #225
<#225>, but no test so far.
There is other stuff I have to do which is more important, so I would be
glad if someone else wants to add a test.
However, YAML.pm has many more problems, and not all are that easy to
fix, or close to impossible without a major rewrite.
But it is not necessary, as there is a replacement. It is recommended to
use YAML::PP <https://metacpan.org/pod/YAML::PP> instead.
AFAIK @ingydotnet <https://github.com/ingydotnet> at some point wants to
update the YAML.pm docs, among other things to add a link to YAML::PP.
—
Reply to this email directly, view it on GitHub
<#224 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB5PLOVMTJI2R42ZYINPVKLX5QQLFAVCNFSM6AAAAAA5RAL4JOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBVGEZTEMBVGQ>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
The docs were now updated in 1.31: https://metacpan.org/release/INGY/YAML-1.31 |
@hadjiprocopis I just stumbled upon your module https://metacpan.org/pod/Data::Roundtrip. I guess the issue was about that.
and I assume this was true for YAML.pm, but not anymore for YAML::PP. |
thank you for spotting this. APOLOGIES. It is an error I made in Data::Roundtrip's documentation. I wanted to say YAML and not YAML::PP. I have corrected that now (v0.26) Inside Data::Roundtrip's I think I mixed my YAMLs :) |
No need to apologize! I already assumed it was a simple typo; just wanted to note it :) |
I am not sure whether this is actually an issue. But roundtripping a perl data structure to a YAML string and back to a Perl data structure causes errors when a string starts with an escaped double quote and contains a single quote (perhaps there are other cases):
I have discovered this when testing another module (Data::Roundtrip) which uses YAML with a random data structure generator and hundreds of trials to check a lot of corner cases.
I used something like this:
I am not sure if this is really an issue.
Bottomline is Load(Dump($perl)) fails for specific data structures.
The text was updated successfully, but these errors were encountered: