Rand Stats



Flower: XML Application Languages


Flower is a library for building and using XML Application Languages. An XML Application Language can be anything that takes an XML document, and parses it using a set of data. It's perfect for creating template engines, custom XML syntax, and much more, all using pure XML as its input and output formats.

Flower was originally written to create an implementation of the TAL and METAL template engines from Zope. Flower's name was originally a play on the Perl 5 Petal library. Since then, Flower has outgrown its original scope, bringing in further ideas from Template::TAL, PHPTAL, and some of my own custom XML concepts. The original TAL/METAL/TALES parsers are still included, and can be easily used by using Flower::TAL, which is included (see below.)


This is an easily loadable library that extends Flower and automatically loads the Flower::TAL::TAL, Flower::TAL::METAL application languages by default, and offers the ability to easily load plugins for the Flower::TAL::TALES attribute parser (used by Flower::TAL::TAL)

Differences from Petal (and Template::TAL, PHPTAL and Zope)

The above list will be updated as this project is developed, as I'm sure other changes will be introduced that will be a gotchya for users of Petal, Zope or PHPTAL.

Flower::TAL::TALES Plugins

Inspired by Petal::Utils, Flower includes a bunch of libraries in the Flower::TAL::TALES:: namespace. These are available using Flower::TAL's add-tales() method.

In addition, the following sets are planned for inclusion at some point:

The syntax for the Flower::TAL plugins is based on the modifiers from Petal::Utils, but extended to use the Flower-specific extensions (the same method that is used to parse method call parameters in queries.) As is obvious, the syntax is not always the same, and not all of the modifiers are the same.

Full documentation for the usage of Flower and the Flower::Utils modifiers will be included in the doc/ folder in an upcoming release, until then there are comments in the libraries, and test files in t/ that show the proper usage.

The URI set from Petal::Utils is not planned for inclusion, feel free to write it if you need it. I'm sure new exciting libraries will be made adding onto these.




Timothy Totten, supernovus on #perl6, https://github.com/supernovus/


Artistic License 2.0