[html-formfu] load_config_file in the middle of YAML
Will Hawes
wdhawes at gmail.com
Wed Oct 10 12:11:49 GMT 2007
On 10/10/2007, Ruben Fonseca <rubenfonseca at di.uminho.pt> wrote:
>
> Hi!
>
> I'm trying to use the load_config_file in the middle of a YAML
> specification to load some common form widgets from another file, but
> so far I've been unsuccessful.
>
> Imagine this YAML:
> ---
> action: /foo
>
> elements:
> - type: Text
> ...
>
> - load_config_file: /foo/file
>
> - type: Submit
> ...
>
>
> And on /foo/file I have:
> ---
> elements:
> - type: Text
> ...
>
>
> This generates an error "an't locate object method "elements" via
> package "HTML::FormFu::Element::Text" at /opt/local/lib/perl5/
> site_perl/5.8.8/HTML/FormFu/ObjectUtil.pm line 264", so I'm certain I
> did something wrong.
>
> Can you tell me the proper way to do this please?
load_config_file is a method of HTML::FormFu. As such I would only
anticipate it working as a top level item in a YAML file.
If you have a look at HTML::FormFu::Manual::Cookbook (currently only in
SVN), there is an example of how to do this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/html-formfu/attachments/20071010/16=
1fadb5/attachment.htm
More information about the HTML-FormFu
mailing list