Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Alias (5735)

  (email not shown publicly)

Journal of Alias (5735)

Wednesday December 05, 2007
09:54 PM

YAML::Tiny 1.21 fixes major bug

[ #35051 ]

I've just uploaded YAML::Tiny 1.21 to the CPAN.

This release fixes a major bug in the serialization that caused any unprintable character (which includes newlines and tab) to be serialized to a reference, which then stringified to REF(memorylocation).

Anything using YAML::Tiny for light weight serialization of arbitrary data is strongly recommended to upgrade.

The root cause of this bug was a trivial typo, with the primary cause attributed to a lack of unit tests (or even sample documents) for unprintable characters, which would have otherwise caused the problems to be picked up by routine round-trip testing.

This has also been resolved.

This bug was also the underlying cause of the CGI::Capture TERMCAP bug.

A new release of CGI::Capture has been uploaded with an updated YAML::Tiny 1.21 dependency to resolve the TERMCAP problem.

This is the final dependency issue preventing a 1.00 release of TinyAuth, which I hope now to complete shortly, after a little more polishing of error handling and the installation code.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • How can a module that's unable to say what it actually does ever have a bug?

    YAML::Tiny is a misnomer and should be abandoned unless it is intending to become compliant to the YAML spec.

    Did you ever answer []
    • is not compliant with the YAML spec.

      YAML::Syck is not compliant with the YAML spec.

      There's a number of instances in YAML::Tiny's comparative tests where I've had to skip comparisons with those modules because they fail.

      YAML::Tiny is quite clear about what it is, a module that supports reading and writing of the block-mode JSON-subset of the YAML specification.
      • At least and YAML::Syck are aiming to be compliant with the YAML spec. If I find a problem with one of these modules, I can look into a spec and decide if it's a bug and file a report. With YAML::Tiny it's difficult to tell whether it's intended or a bug.

        About the JSON-subset: where can I read this? I grepped the documentation and could not find a reference to it.

        I am not against a tiny implementation of YAML, but it should go together with a tiny spec.

    • As to that message, I believe we ended up with the position that for the purposes of the core, it was just fine to call it something like CPAN::ParseMETAyml or whatever, as long as it implemented something similarly light to the read half of YAML::Tiny.
    • Perl doesn't have a formal spec, either, yet it seems to acquire its fair share of bugs :).

      YAML::Tiny has a perfectly decent (informal, implicit) spec:

      1. if write_string is passed any Perl data structure consisting only of unmagical scalars, arrays and hashes, produce a spec-compliant YAML document representing it which can be parsed by YAML::Tiny or any more complete YAML parser;
      2. if write_string is passed any other Perl data structure, report an error saying so;
      3. if read_string is passed any spec-compl
      • The elements that belong in 3.1 SHOULD be something like "any block-mode YAML content that resolves to the classes of Perl structures supported by write-out".
      • Perl doesn't have a formal spec, either, yet it seems to acquire its fair share of bugs :).

        Do you see someone distributing software with "Perl" in the name that doesn't actually do what Perl does? I haven't, at least since kurila picked up its new name.

        • Doesn't YAML::Tiny tell the user exactly what it is?


          YAML::Tiny - Read/Write YAML files with as little code as possible
          PREAMBLE ^

          The YAML specification is huge. Really, really huge. It contains all the functionality of XML, except with flexibility and choice, which makes it easier to read, but with a formal specification that is more complex than XML.

          The original pure-Perl implementation YAML costs just over 4 megabytes of memory to load. Just like with Windows .ini files (3 meg to load) and CSS (3

          • > I read that and knew exactly what it did. It doesn't attempt to follow the huge YAML spec but doesn't allow you to read/write basic YAML files.

            huh? Is that a typo?

            Look at the samples contain in the tests, it lets you read/write all sorts of basic YAML files.
          • Doesn't YAML::Tiny tell the user exactly what it is?

            I suppose that depends on your definition of the words incomplete, correct, usable, and specification.

    • YAML looks simple, but is actually a bloated nightmare. Implementing the full YAML spec is tedious and difficult. Most uses of "YAML" actually use only a small subset. YAML::Tiny tries to implement this small, simple subset. I'm not sure why you find this so hard to understand.
      • > YAML::Tiny tries to implement this small, simple subset.

        If you read the manpage from the first to the last line you still have no idea what this small, simple subset actually is. Whenever you have a small, simple YAML file that fails, or a small simple perl data structure that cannot be represented in YAML via YAML::Tiny, you cannot tell if it fails because of a bug or if it fails because the author has chosen to not implement some aspect of that small simple YAML file or that small, simple perl datast
        • I see your point, but I'm more willing to have the line between "bug" and "outside the spec" be negotiated between author and user. Many specs are so hairy that in practice you can only deal with them by having a general idea of their intent, then trying stuff to see what breaks. I haven't read the HTML 4 spec (746 KB of text), don't plan to, and couldn't remember it all if I did, but I can still hack together a webpage based on my rough understanding.

          The same goes (for me) for YAML::Tiny -- I'll use it