XML::Tiny update

drhyde on 2009-03-22T21:20:00

XML::Tiny has gained a feature. It now has a sort-of DOMmish interface.


Bloat?

Alias on 2009-03-22T22:47:01

Doesn't this violate the spirit of the ::Tiny suffix?

It adds 50% extra code for an optional feature, and XML::Tiny is no longer a single class.

Since parsedommish is just...


sub parsedommish {
        return XML::Tiny::DOMmish::Node->new(parsefile(@_)->[0]);
}
... it looks like it would be much better off as a separate module that wraps XML::Tiny.

Re:Bloat?

drhyde on 2009-03-23T16:33:16

Much of the bloat is documentation. Removing that, it's gone from 156 lines to 240 lines, or 5600-ish bytes to 8000-ish bytes. I think that's still pretty damned tiny. And while it does add another class, it's still only one file. It could have been a single package still with pretty much zero code changes from what's there now, but at the expense of Doing The Wrong Thing if you ever have an XML element of attribute called 'parsefile'.

I might remove the 'values' method though - it doesn't really add much value (haha), and dates from before I added the '*' option.

Re:Bloat?

Alias on 2009-03-23T23:50:15

Could you at least use a name that's less eye-melting than "::DOMish::Node" ? :/

Re:Bloat?

drhyde on 2009-03-24T14:44:40

On further reflection, you're right. I'm gonna cut it out and release it as another distribution. This has the advantage of pushing me further up the CPAN leaderboard :-)

Re:Bloat?

Alias on 2009-03-24T22:46:12

You've discovered the secret of my success (on that leader board) :)