[Petal] New releases

Jean-Michel Hiver jhiver at mkdoc.com
Wed Oct 1 17:39:24 BST 2003


> Thanks for the updates. The biggest problem I'm having with migrating
> to the latest version of Petal is that, as much as I hate to admit it
> to this group of hardcore standardists <g>, most of my templates are
> not well-formed.

Heh, nobody's perfect :)


> This means that Petal is essentially non-backwards compatible for me
> and that I will need to update all of my projects to either make the
> templates XHTML compliant (probably the best solution) or add the `use
> Petal::Parser::HTB` line (the most likely solution).

Mhhh. Maybe I should write a Petal::Tidy module that would subclass
Petal, and use HTML::Tidy to make sure templates are compliant before
sending them to Petal.

But maybe that's a bit over the top...


> For this reason, I think the next release of Petal should be 2.0 to
> let folks know that significant changes have been made that may affect
> them.

I've got to disagree. While it's true that it breaks backwards
compatibility *only if your templates were not valid*, it's basically
the same codebase (apart from the parsing backend which is now 100%
perl).


I find it kind of neat to have the following deps:

  Petal            - 100% perl
    => MKDoc::XML  - 100% perl

Rather than

  Petal
    => XML::Parser
       => expat.h
    => HTML::TreeBuilder
       => HTML::TagSet
       => HTML::Element
       => HTML::Parser

So from this point of view I think it is an improvement. I've tried to
make it as simple for you (with Petal::Parser::HTB) as I could. Sorry if
it's a hassle.


FYI next thing on my TODO list for Petal (well, once I get to release a
stable 1.10) will be a minimalistic implementation of METAL which I'll
be able to build upon to reach a full working implementation.

I think I'll be able to implement it without having to do a rewrite.
which is good - it would be a shame to have to throw away all the code
that Just Works.


> BTW, I haven't tested the new versions yet but will do shortly (been
> out of town for my anniversary).

Nice one!
Cheers,
-- 
Building a better web - http://www.mkdoc.com/
---------------------------------------------
Jean-Michel Hiver
jhiver at mkdoc.com  - +44 (0)114 255 8097
Homepage: http://www.webmatrix.net/


More information about the Petal mailing list