On 06/03/07, John Napiorkowski <[EMAIL PROTECTED]> wrote:
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.
Hopefully that's the biggest architectural changes finished, so it should be ok now to work on other things, and not have a complete nightmare to merge them in to trunk.
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?
It sounds very interesting. If you have a google account, let me know the username and I'll give you svn access - then you can create a new branch for this. (If you don't already have a google account, you can create one using any email address - you don't have to create a gmail account). Cheers, Carl _______________________________________________ Html-widget mailing list Html-widget@lists.rawmode.org http://lists.rawmode.org/cgi-bin/mailman/listinfo/html-widget