For the last couple of days I've been grappling with POD.
POD is a real pain in the ass. It's fairly decent to author (for the right kind of docs), but there really are no good and complete parsers for it. I've done this rant before so I won't bore you with it again.
Anyway, I've now re-written Pod::SAX twice in two days. Originally it used Pod::Tree, but I decided in the end I wasn't willing to fight against it's bugs and crappy parsing (e.g. it always gave buggy results when parsing strings) and/or wait for a module update.
So then I switched to Pod::POM, which being an Andy Wardley module I expected to be first rate. But it seemed to be focused too strongly on outputting POD to either a string or a filehandle, rather than on doing something like SAX over the top.
So finally I've gone full circle and back to Pod::Parser. Now I really hate Pod::Parser, because it seems almost entirely focussed on outputting some alternative format to Pod to a file or STDOUT. But it *is* possible to circumvent that. So I did. And although I had to write my own link parsing code, and my own E parser, and my own code for doing nested =item tags, and my own code for... (well you get the picture)... it's now pretty decent, and I'm happier with it's output.
0.03 is now on CPAN.
POD::SAX as a building block (Score:2)
Seems to me things like Pod::Parser and so on could be reimplemented in Pod::SAX, right? Pod::SAX could become the new central module at the heart of it all? But I'm not a SAX/XML guy [yet], so I don't really know.
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Re:POD::SAX as a building block (Score:2)
The reality is you're absolutely right - people could use Pod::SAX as a much simpler Pod parser. But they won't, because they see XML and moan that it's harder than plain perl. *shrug*
Re:POD::SAX as a building block (Score:2)
I'd be interested in reading anything along the lines of "Here's why SAX is the greatest thing since sliced bread" aimed at people who understand but have not used XML. Any links you can recommend?
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Re:POD::SAX as a building block (Score:2)
I'd say that's our weakness. There's not much out there about SAX for that kind of audience. I think that somehow we were so convinced of SAX's simplicity that we more or less silently thought everyone with minimal XML knowledge would find it obvious. Experience shows that that's not the case, and people do seem to try to look for complexity where we can't see it. There must be a reason :)
There are however a few resources. Some of Kip's articles on xml.com do talk about SAX, with some nifty example
-- Robin Berjon [berjon.com]
Re:POD::SAX as a building block (Score:2)
Thanks for the info!
There are cases in which SAX definitely beats sliced bread, and others in which it sucks.
Of course. I knew that going in. Even Perl isn't suited for everything, and good Perl programmers almost universally admit it, I think. (Although issues for which Perl is not suited are fewer and further between as time goes by, it seems.) If I thought SAX adherents wanted to throw SAX at every problem, I wouldn't trust it and wouldn't be asking. :) But since I've seen people I respect (e.
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Re:POD::SAX as a building block (Score:2)
Anyway, Pod::SAX looks quite interesting and I'm hoping to use it for translating the Mason book (which is in POD) to HTML for the masonbook.com website (nothing there yet folks, sorry).
I'v
Re:POD::SAX as a building block (Score:2)
We want a lightning talk. Or a 2 page tutorial.
-- ask bjoern hansen [askbjoernhansen.com], !try; do();
Pod (Score:1)
And are you finding Pod::Escapes useful?
That reminds me: now that my book is done, I can finally go back to finishing up the new Pod parser, which I am tempted to declare the reference implementation, for lack of any particular alternative.
Re:Pod (Score:2)
I haven't used Pod::Escapes, and I have no idea what's a good test for perlpodspec compliancy.