[html-formfu] More questions about selects :)

Carl Franks fireartist at gmail.com
Wed Feb 13 08:30:09 GMT 2008


On 13/02/2008, Andreas Marienborg <omega at palle.net> wrote:
>
> On Feb 12, 2008, at 11:14 AM, Carl Franks wrote:
> > And it'll also automatically create methods for
> > empty_first_label_loc() and empty_first_label_xml()
> >
>
> Ahh, the magic is endless :p calling $self->empty_first_label gives me
> the translated one if there is one it seems :) I was trying to check
> for a set one and translate myself, but it just works (tm).

did you mean empty_first_label_loc()?
empty_first_label() should just output a html-escaped copy of what you put in.

> > The more difficult bit will be searching through _Group.pm for all
> > uses of empty_first and making sure it's handled properly.
> >
>
> There doesn't seem to be any tests for empty_first either? atleast
> grepping t/ doesn't show anything.

my bad!

> I attach a patch here, for review before I commit, just to make sure
> the code-style is ok, tests are correctly done etc.

The only thing wrong I can see is that you're not explicitly importing
'mk_output_accessors' from HTML::FormFu::Attribute.
For some reason, that seems to work fine on perl 5.8.x (I'm guessing
it searches @ISA) - but will die on perl 5.10.x

Other than that, though - it looks great.
Don't worry about style too much. There's a .perltidyrc file in svn
that I use to periodically clean up all the files.
Unfortunately, I can't get access to the repository hooks, otherwise
I'd add a pre-commit hook to enforce The Style ;)

Cheers,
Carl



More information about the HTML-FormFu mailing list