[html-formfu] load_config_file won't find .yml

Carl Franks fireartist at gmail.com
Tue Dec 8 19:32:21 GMT 2009


2009/12/8 Ascii King <tech at swattermatter.com>:
> Carl Franks wrote:
>>
>> Can you check the value of $form->config_file_path()
>> for a form while it's running under Catalyst.
>> It should be set to something like:
>>    /path/to/app/root/forms
>>
>> Carl
>>
>
> I use :FormConfig() to set the path.  I don't know how to check the
> $form->config_file_path() while it's running. I put a debug line in the
> function, but it doesn't get that far. It does display
>
> sub new_character : Local FormConfig('character/new_character.yml') {
>  my ($self, $c) = @_;
>
>  # Print a message to the debug log
>  $c->log->debug("*** INSIDE new_prior METHOD for config_file_path =
> $c->stash->{form}->config_file_path() ***");
>
> The only message I see about path is:
> [debug] Path is "prior/new_prior"
>
> How should I check for this?

Doh, I should have considered that!
If you remove the FormConfig attribute, so the action runs, then dump
$self (the controller),
you should find the Catalyst-Controller-HTML-FormFu config in there.
It should be under {_html_formfu_config}{constructor}{config_file_path}

Carl



More information about the HTML-FormFu mailing list