[Petal] Petal 0.91 Released

Jean-Michel Hiver jhiver at mkdoc.com
Mon Apr 7 17:48:07 BST 2003


Hi List,

Finally, I got my head around re-writing the documentation! Patrick was
kind enough to proof-read it but I'm sure there's quite a few typos and
mistakes left... Anyway I hope you'll find it better than the previous
one.


I also added a 'multi-language' mode to Petal. I confess that this was
introduced to serve MKDoc's purpose, but it really makes sense to have
it in Petal sooo...

Here's how it works:

Instead of pointing Petal to a file, you point it to a directory which
has localized templates, for example, you have a directory:

  scratch/
  scratch/en.html
  scratch/en-US.html
  scratch/fr.html
 
Then you invoke your template as follows:

  my $template = new Petal (
      file => 'scratch',
      lang => 'fr-CA'
  );

And Petal will try to fetch scratch/fr-CA.html, then scratch/fr.html,
then scratch/en.html, then gives up and complains. This new feature
should be entirely backwards compatible. And it should be documented in
the new docs as well.


Last but not least, I applied Fergal's patch and as he suggested made
includes scoped as well as loops to avoid included templates overriding
parents variables.

I'm pretty confident that this release should not introduce any new
horrible bug, but just in case, let me know how it goes :)
-- 
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