Skip Menu |

This queue is for tickets about the Kwalify CPAN distribution.

Report information
The Basics
Id: 48714
Status: resolved
Priority: 0/
Queue: Kwalify

People
Owner: Nobody in particular
Requestors: KITANO [...] cpan.org
Cc:
AdminCc:

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



the data which is expected to be HASH is validated. but the validation method doesn't return immediately when there is validation errors in data. so, validation method dies because of it. Validation method must return immediately if data isn't hash when data must be hash. I made a patch for this problem. Could you apply it? --- Kwalify.pm.orig>....2009-07-29 08:41:55.000000000 +0900 +++ Kwalify.pm>.2009-07-29 08:42:57.000000000 +0900 @@ -318,7 +318,8 @@ Show quoted text
>......return;
} if (!UNIVERSAL::isa($data, 'HASH')) { ->......$self->_error("Non-valid data " . $data . ", expected mapping"); +>......$self->_error("Non-valid data " . $data . ", expected mapping. Hash is expected."); + return; } return if ($self->{done}{overload::StrVal($data)}{overload::StrVal($schema)});
On Fri Aug 14 11:03:15 2009, KITANO wrote: Show quoted text
> the data which is expected to be HASH is validated. but the validation > method doesn't return immediately when there is validation errors in > data. so, validation method dies because of it. > > Validation method must return immediately if data isn't hash when data > must be hash. > > I made a patch for this problem. Could you apply it? > > --- Kwalify.pm.orig>....2009-07-29 08:41:55.000000000 +0900 > +++ Kwalify.pm>.2009-07-29 08:42:57.000000000 +0900 > @@ -318,7 +318,8 @@
> >......return;
> } > if (!UNIVERSAL::isa($data, 'HASH')) { > ->......$self->_error("Non-valid data " . $data . ", expected mapping"); > +>......$self->_error("Non-valid data " . $data . ", expected mapping. > Hash is expected."); > + return; > } > > return if > ($self->{done}{overload::StrVal($data)}{overload::StrVal($schema)});
Thanks, this is fixed in the CVS repository (:pserver:anonymous@srezic.cvs.sourceforge.net:/cvsroot/srezic, module Kwalify) and will be part of the next release 1.20. Just one thing: please attach patches and do not put them inline, because RT seems to scramble them to unusability. Regards, Slaven