Hi,

In FormFu/ObjectUtil.pm the 'load_config_file' sub is designed to read directly 
off the filesystem.  For my particular needs I'd want to be able to read a 
configuration directly out of my user supported wiki.  I always admired how 
template toolkit allowed you to define an array of template providers so that 
you could read templates from the filesystem or from other locations and was 
wondering if it's a good time yet for user contrib.  I know I only asked about 
this a few days ago, but since this idea is mostly isolated from general form 
development I thought it could be a good time.

If I was to do this I'd make it very similar to the way template toolkit works, 
where there'd be a provider attribute for the form object that would have a 
sane default (ie read from the filesystem just like it does now).  I think 
having the prefix mapping could be nice as well, so you could say 
->load_config_file('http://www.host.org/forms.login.yml') just like with TT.

For those not familar with how TT does this see 
"http://search.cpan.org/~abw/Template-Toolkit-2.18/lib/Template/Provider.pm";.

The only thing I'd do differently is I think I'd use 
http://search.cpan.org/~nnunley/Filesys-Virtual-Base-0.2/ as my base class, 
that way we could immediately take advantage of all the Filesys-Virtual classes 
already out there.  Also I'd want to cache the provided configuration in a temp 
area and maybe use memoize to speed up parsing of unchanged configuration files.

What do you think?

--John





 
____________________________________________________________________________________
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091

_______________________________________________
Html-widget mailing list
Html-widget@lists.rawmode.org
http://lists.rawmode.org/cgi-bin/mailman/listinfo/html-widget

Reply via email to