Subject: | producing warnings in 'check' sub leads to check failing. |
Date: | Sun, 21 Feb 2010 15:41:41 -0300 |
To: | bug-HTML-FormHandler <bug-HTML-FormHandler [...] rt.cpan.org> |
From: | Edmund von der Burg <evdb [...] ecclestoad.co.uk> |
An example
has_field 'test' => (
type => 'Text',
label => 'Test',
apply => [
{
check => sub {
warn "warning produced";
return 1;
},
message => 'check returns true - this message should not be seen',
},
]
);
This check will always fail - but comment out the warning and it passes.
Not being able to emit warnings in the validation code makes it
difficult to debug.
Cheers,
Edmund.
--
Who will you vote for? http://www.YourNextMP.com