Skip Menu |

This queue is for tickets about the Kwalify CPAN distribution.

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

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

Bug Information
Severity: Normal
Broken in: 1.20
Fixed in: 1.20_50



Subject: unique in map doesn't work
unique in map doens't work because the key of $unique_mapping_val isn't correct. I attached the patch for this bug. Could you apply it?
Subject: unique_in_map.patch
--- Kwalify.pm.orig 2009-08-18 19:48:22.000000000 +0900 +++ Kwalify.pm 2009-08-18 19:52:21.000000000 +0900 @@ -355,10 +355,11 @@ } my $unique = _get_boolean($subschema->{unique}); if ($unique) { - if (defined $unique_mapping_val->{$key}->{val} && $unique_mapping_val->{$key}->{val} eq $data->{$key}) { - $self->_error("'$data->{$key}' is already used at '$unique_mapping_val->{$key}->{path}'"); + if (defined $unique_mapping_val->{$data->{$key}}->{val} + && $unique_mapping_val->{$data->{$key}}->{val} eq $data->{$key}) { + $self->_error("'$data->{$key}' is already used at '$unique_mapping_val->{$data->{$key}}->{path}'"); } else { - $unique_mapping_val->{$key} = { val => $data->{$key}, + $unique_mapping_val->{$data->{$key}} = { val => $data->{$key}, path => $subpath, }; }
On Tue Aug 18 07:02:01 2009, KITANO wrote: Show quoted text
> unique in map doens't work because the key of $unique_mapping_val isn't > correct. > > I attached the patch for this bug. Could you apply it?
Thanks, this is in 1.20_50, which is on its way to CPAN and github. Regards, Slaven