[html-formfu] Beware of char cases

Carl Franks fireartist at gmail.com
Mon Oct 22 09:33:56 GMT 2007


On 22/10/2007, Daisuke Maki <daisuke at endeworks.jp> wrote:
>
> > You should delete the old templates files, and re-create them again
> > using Catalyst::Helper::HTML::FormFu or HTML::FormFu::Deploy
>
> Somehow I don't think we're talking about the same thing.
> In fact I did re-deploy all the templates before trying to solve this
> problem.

Yup, monday morning :(

You've still got the lowercase Element/*.pm files installed somewhere
in your @INC path.
You should delete them. (and also the lowercase Filter/*.pm,
Constraint/*.pm, Deflator/*.pm, Inflator/*.pm and Validator/*.pm
files).

Once you've done that, you'll find everything breaks, but that's okay,
you just need to fix your config files to use the new CamelCase
elements :)

The following one-liner should fix a typical yaml config file using
the "type: text" syntax:

perl -lpi -e 's/(type:\s+\x{0027}?)([a-z]+)(?:_([a-z]+))?(\x{0027})?/$1.ucfirst($2).ucfirst($3).$4/e'
form.yml

Carl



More information about the HTML-FormFu mailing list