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

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 []
    • by mauzo (8185) on 2007.12.06 0:46 (#59316)
      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-compliant YAML document, either
        1. parse that document correctly and return the corresponding Perl data structure, or
        2. report an error that this document is unsupported and a more complete parser should be used;
      4. if read_string is passed anything that isn't a spec-compliant YAML document, report an error saying so.

      Any other behaviour, such as Adam has just fixed, is a bug. The only thing that might be useful is documentation of which cases get 3.1 and which get 3.2.

      • 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.