Skip Menu |
 

This queue is for tickets about the HTML-FormFu CPAN distribution.

Report information
The Basics
Id: 60311
Status: open
Priority: 0/
Queue: HTML-FormFu

People
Owner: Nobody in particular
Requestors: gernotk [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: HTML::FormFu::Constraint::_process_when considers 'not' only for specific 'values' -- not for the field value's sole existence
Date: Fri, 13 Aug 2010 19:23:19 +0200
To: bug-HTML-FormFu [...] rt.cpan.org
From: Gernot Kieseritzky <gernotk [...] gmail.com>
Download (untitled) / with headers
text/plain 551b
HTML::FormFu::Constraint supports the 'when' option allowing to turn on the constraint depending on the 1) presence of ANY value for the field name spec. under 'field' key or 2) presence of a list of specific values for the field name spec. under 'field' It also supports a negation using 'not' for case 2). Unfortunately, it does not support negation of 1) because of the code line return 0 if !defined $when_field_value; Which should be replace with my $ok; $ok = defined $when_field_value; $ok = $when->{not} ? !$ok : $ok; return 0 if $ok;
This makes sense - could you write up a test file for it, and I'll add the fix. Cheers, Carl


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.