[Html-widget] Testing space before next cpan release

Carl Franks fireartist at gmail.com
Thu Oct 26 13:10:34 GMT 2006


There are a couple of changes in behaviour since the last cpan
release, so you might want to test the current svn version before the
next cpan release comes out.

$result->param() now dies if called with more than 1 argument - it's
documented readonly, so if you're trying to use it to set a value, it
won't be doing what you expect anyway.
If you want to set a value, instead use $result->add_valid( name => $value ).

When an Equal constraint fails, the first named element's value is no
longer considered valid.
Example:
$w->constraint( Equal => 'foo', 'bar' );
# submit foo=1, bar=2

# previous behaviour...
$r->valid('foo'); # true
$r->valid('bar'); # false

# new behaviour...
$r->valid('foo'); # false
$r->valid('bar'); # false

All elements associated with a failing Equal constraint receive an error.
To get the previous behaviour of errors being shown on all elements
except the first, use $w->render_errors() to list the elements for
which the errors should be displayed.

The Maybe constraint is now documented as deprecated, so that we may
remove it at some point in the future.
'Maybe' is the default behaviour, so this constraint doesn't do
anything (it doesn't even contain any code).

There are also several new features and bugfixes, see the Changes file
for details.
http://dev.catalystframework.org/browser/trunk/HTML-Widget/Changes

Carl



More information about the Html-widget mailing list