Subject: | Defaults override actual item values |
Date: | Mon, 26 Apr 2010 14:47:21 -0500 |
To: | bug-HTML-FormHandler [...] rt.cpan.org |
From: | Andy Clayton <clayton [...] physics.umn.edu> |
Hello,
I'm having trouble with FormHandler 0.31002 where default values
override/have higher precedence than the actual values. I've attached a
patch that updates the test suite to illustrate the issue as well as
provides a fix.
Thanks,
Andy
Index: BuildFields.pm
===================================================================
--- BuildFields.pm (revision 1431)
+++ BuildFields.pm (revision 1432)
@@ -201,10 +201,11 @@
my $loaded;
foreach my $ns (@{$self->field_name_space}) {
$class = $ns . "::" . $type;
- if( Class::MOP::load_class($class) ) {
+ try {
+ Class::MOP::load_class($class);
$loaded++;
last;
- }
+ } catch { }
}
die "Could not load field class '$type' for field '$name'"
unless $loaded;