Howdy,

This is a followup to a thread a little while back.  I wrote a plugin to
help include simple hashes.  I walk the INCLUDE_PATH, and using key
fallback, fold conf files into a single hash.

Syntax looks like this

[% USE dho = DataHash() %]
[% hash = dho.hash('conf.yaml') %]

You can then do [% hash.key %].

The files are here

http://search.cpan.org/~earl/Template-Plugin-DataHash-0.04/

There is a README here

http://search.cpan.org/src/EARL/Template-Plugin-DataHash-0.04/README

Right now, I support perl, storable, xml, yaml and split files.  A split
file just runs a split /\s+/, 2 on each line to key keys and values.  Very
nice for simple files containing text for pages.  New file types are easy to
add, so let me know if you would like to see more.

I am interested in any relevant feedback or suggestions.

Thanks,
Earl

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to