[Html-widget] opinions of removing implicit fieldset / breaking back-compat

Carl Franks fireartist at gmail.com
Wed Nov 8 10:07:39 GMT 2006


I've mentioned a couple times recently about making changes that might
break back-compatibility, and not had a response, so it's hard to know
whether there would be outrage if I did intentionally break something.
Let me know! ;)

I'd like to remove the implicit sub-container: meaning, if you do this...
$widget->element( Textfield => 'foo' );
...you no longer get an implicit Fieldset around the form elements.

This means you would explicitly have to do...
my $fs = $widget->element( 'Fieldset' );
$fs->element( Textfield => 'foo' );
...and explicitly add your elements on to a fieldset.
Which is already the preferred method.

There are a couple reasons I'd like to make this change:
Firstly, if you get in the habit of adding Elements directly onto the
widget, and then want to make the simple change of adding a Block or
UnorderedList, etc, before the first element, you get a fatal error.
$w->element( 'Block' )->value( 'some content' );
$w->element( Textfield => 'foo' );
already a top-level container when trying to setup implicit container
at -e line 2

Also, it makes the code more complicated than necessary, with extra
checks and logic spread throughout both Widget.pm and Result.pm,
making some changes much more complicated than they ought to be.

How shall we go forward with this?
Do I just make the change if no-one shouts too loud?
We changed the behaviour of attributes() recently, and there wasn't a
fall-out, should I take that as a good sign?

Carl



More information about the Html-widget mailing list