Stories
Slash Boxes
Comments
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.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • After both threads, I feel like I'm in 3rd grade again.

    If you don't like *::Tiny, don't use them. If you think they suck, submit a patch. If *::Tiny does what you need, without installed 42 other modules, (most of which in the XML namespace have various levels of compile headaches and lib versioning issues) then awesome.

    Really, what's the big deal again? It feels like quibbling about calling a non-pedigree cat a feline just because it's not a purebred.
    • Really, what's the big deal again?

      CPAN names are rare. They're first-come, first-served. Thus it seems rude to me to claim a namespace for a distribution that doesn't actually do what the name claims.

      There's tremendous potential for confusion among the vast majority of CPAN users who've never read use Perl. That seems, to me, highly unfair.

      I'm also much less of a fan of bandying about strong assertions such as "Oh yeah, well no real user ever really uses this feature or that feature" without some

      • I don't necessarily disagree with your overall naming issues. But if DBI and XML namespaces are so precious, they should be locked down, and registered to the appropriate set of users. But since we don't register namespaces any more on CPAN, game on as it seems.

        If it takes uploading DBI::Tiny (a templating system), CGI::Tiny (a configuration file format parser), Net::Tiny (a program to build and install distributions), and (just for you) Handel::Tiny (an interpreter for ColorForth) to demonstrate to every

        • XML::Tiny does have something to do with XML.

          Perhaps it does in the sense that what it parses bears a superficial resemblance to XML, in the same way that what PPI::Tiny parses bears a very superficial resemblance to what PPI parses.

          XML has a widely-distributed, well-understood, and well-implemented specification. It's easy to test a parser for compliance with the specification. If it fails, it's not an XML parser.

          That was the point of specifying XML.

          XML::Tiny deliberately does not implement th

          • > PPI::Tiny parses bears a very superficial resemblance to what PPI parses.

            Hardly. It bears more of a resemblence to String.pm

            NONE of the Tiny modules are in compliance with the standards they implement, and all of them make quite clear that they are for a very specific use case, and you should move to a real module as soon as it doesn't meet your needs.

            And the argument of implementing something DIFFERENT, as opposed to implementing something incompletely, is a complete straw man argument.
            • It bears more of a resemblence to String.pm.

              Without a specification, I can't see how anyone can decide what is and isn't PPI. I chose the example pretty carefully.

              YAML::Tiny doesn't parse YAML. That is, I can give it a valid YAML document--perfectly valid, according to the YAML specification--and the module will fail to parse it appropriately. The documentation makes it very clear that you aren't interested in parsing YAML. That's fine, but it makes me wonder why YAML is in the name of the distri

              • Yes, PPI is a suitable grey case, because it's an incomplete but suitably useful implementation of a language which itself does not have a specification. In fact, as I've pointed out in talks, at the deeper levels of understanding "There is no Perl".

                > YAML::Tiny doesn't parse YAML. That is, I can give it a valid YAML document--perfectly valid, according to the YAML specification--and the module will fail to parse it appropriately

                That's not entirely correct.

                If you give it a set of YAML documents, it will parse some of them appropriately and some it will refuse to parse at all.

                YAML::Tiny comes with compatibility tests. In fact, it ONLY comes with compatibility tests.

                For every single test document, if YAML.pm and/or YAML::Syck are installed, it will load the same test document using YAML::Tiny, YAML.pm and YAML::Syck and make sure that what YAML::Tiny parses the document into matches what the other two would.

                In fact, in writing YAML::Tiny I've found incompatibilities in BOTH of the others, where they don't parse according to the specification either.

                YAML::Tiny parser SOME YAML documents, just not ALL of them.

                I think the big difference in the XML::Tiny case is, as you say, in the quality of the documentation.

                I've always been careful to say which subset the module is aimed at, and to try to repeatedly point out over and over again that the module is ONLY useful for a subset of cases, and that people should be prepared to move up to "real" modules (and I generally recommend which) when they outgrow the limited cases in which the tiny modules are useful.

                I don't really like the docs for XML::Tiny in that they talk about what the module DOESN'T do, rather than what it DOES do. I hope that will be fixed.
                • What I should also mention here is that I think the argument really comes down to a question of "If you don't implement the full specification of $foo, can you call something a $foo parser".

                  In the sense that YAML::Syck does not parse the entire YAML specification, do we call YAML::Syck "not a YAML parser"?

                  I think there's a place for non-speck parsers, with suitable caveats, when you don't have the resources to run a full parser.
                  • It is fine to reject valid documents if they use format features you do not implement. It isn’t fine to just bumble on, returning junk to the API client. YAML::Tiny does the former. XML::Tiny does the latter. In fact, it will fail to reject a lot of malformed XML documents as well. And on top of it, it mangles the text content so that you cannot recover the original text unambiguously.

                    That is not an XML parser, it isn’t even a parser for a subset of XML. It is just a parser for stuff that ha

                    • Whether ignoring things like processing instructions and entity declarations instead of dealing with them properly means that the results are "junk" is a matter of opinion. In my experience - experience in which I only use XML because it's what some other guy has provided - ignoring them has always been just fine.

                      And on top of it, it mangles the text content so that you cannot recover the original text unambiguously.

                      Aye, and the next release will fix that. Although to be honest I don't consider it to be

                    • Things like “&” are very common in XML on the web: that’s what ends up in the RSS feed when you type an ampersand into a weblog.

                    • When you get & through, you *know* that it was originally &, because you know that I would have translated & :-)

                      Anyway, the shiny new no_entity_parsing and strict_entity_parsing options (on CPAN in the next few days) should fix that.

                • I don't really like the docs for XML::Tiny in that they talk about what the module DOESN'T do, rather than what it DOES do. I hope that will be fixed.
                  That's certainly a change I'm prepared to make. I'll also keep a section on what it doesn't do