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
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Bloat? (Score:1)
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]);
}
Re:Bloat? (Score:2)
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.
Reply to This
Parent
Re: (Score:1)
Could you at least use a name that's less eye-melting than "::DOMish::Node" ? :/
Re: (Score:2)
Re: (Score:1)
You've discovered the secret of my success (on that leader board) :)