Skip to content

Use something other than YAML #170

Open

Description

@robrwo

YAML 1.31 recommends using something else, such as YAML::PP.

I have experimented with switching to YAML::PP and YAML::Tiny but the tests fail to subtle differences in serialisation. Notably, some numbers are turned into strings, e.g. version: \'1.64\' instead of version: 1.64.

In experiments YAML::Tiny seems to work better as it preserves decimal places, e.g. 0.00 is not turned into 0.

(On closer inspection, YAML::Tiny does not support all of the required features.)

Activity

  1. robrwo commented on Jan 2, 2024

    @robrwo
    Author

    I'm unsure if using an XS module or one that uses an external library like YAML::Syck is appropriate.

  2. rabbiveesh commented on Jan 2, 2024

    @rabbiveesh
    Contributor

    I don't think i'd want to make an XS module a mandatory dep, though i'd be happy for it to be an optional one that's loaded if available.

  3. mikkoi commented on Apr 17, 2025

    @mikkoi

    We could use https://metacpan.org/dist/YAML/view/lib/YAML/Any.pod

    YAML::Any - Pick a YAML implementation and use it.

    Currently, YAML::Any will choose the first one of these YAML implementations that is installed on your system:

    YAML::XS
    YAML::Syck
    YAML::Old
    YAML
    YAML::Tiny

  4. rabbiveesh commented on Apr 17, 2025

    @rabbiveesh
    Contributor

    That sounds like a good idea - i guess we should double check that we have some sanity test, and then switch to ::Any, and reject any implementations that don't have all the features

  5. mikkoi commented on Apr 17, 2025

    @mikkoi

    PR: #190

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions