[html-formfu] Standalone testing with FormFu

Zbigniew Lukasiak zzbbyy at gmail.com
Mon Sep 24 11:10:48 GMT 2007


> There's 2 ways already of doing something similar:
>
> use HTML::FormFu;
> use YAML::Syck qw( Load );
>
> my $form = HTML::FormFu->new;
>
> $form->populate( Load( do { local $/; <DATA> } ) );
>
> print $form;
>
> __DATA__
> ---
> elements:
>   - name: foo
>   - name: bar
>
> ... or ...
>
> use HTML::FormFu;
> use YAML::Syck qw( Load );
>
> my $form = HTML::FormFu->new;
>
> $form->populate( Load( <<END ) );
> ---
> elements:
>   - name: foo
>   - name: bar
> END
>
> print $form;
>
> Because load_config_file() uses Config::Any in the background, so as
> to allow freedom of choice of config format, I wouldn't really want to
> provide a yaml-specific method, if it's only real benefit is in test
> files.

Thanks!  That's what I needed.

Z.


>
> Carl
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>


-- 
Zbigniew Lukasiak
http://brudnopis.blogspot.com/



More information about the HTML-FormFu mailing list