Skip Menu |
 

This queue is for tickets about the Data-Difference CPAN distribution.

Report information
The Basics
Id: 109262
Status: new
Priority: 0/
Queue: Data-Difference

People
Owner: Nobody in particular
Requestors: Peter [...] PSDT.com
Cc:
AdminCc:

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



MIME-Version: 1.0
X-Spam-Status: No, score=-2.75 tagged_above=-99.9 required=10 tests=[AWL=-0.150, BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
X-Cmae-Envelope: MS4wfBLgRryyNnmmWi6SdEdpHJ2egSJeJP48UUC8zXg8lHMQozMh3oURbev2oAGcrjr2W7N55EA2a7xAgWldizozZLtV0tyLISlU92kQk6O5JYTZL8YaxWFR eW7nCgXnK3Z8v8YUIpEsB4AN9XUJgRb+OKp1pSQlARdYawc6dTgwWqs/
X-Antivirus-Status: Clean
X-Spam-Flag: NO
X-Authority-Analysis: v=2.1 cv=eLuz9Cd1 c=1 sm=1 tr=0 a=IvP8ZCTvA+e9YmKUWTLiTw==:117 a=IvP8ZCTvA+e9YmKUWTLiTw==:17 a=4nGKzdA1AAAA:8 a=IkcTkHD0fZMA:10 a=QBi9Gq7aqdZTCgX-YwIA:9 a=QEXdDO2ut3YA:10
X-Antivirus: avast! (VPS 151120-1, 11/20/2015), Outbound message
content-type: text/plain; charset="utf-8"; format="flowed"
Message-ID: <564FB270.4000503 [...] PSDT.com>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -2.75
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id BA65A2402E8 for <cpan-bug+data-difference [...] hipster.bestpractical.com>; Fri, 20 Nov 2015 18:53:39 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EkeSOLG2z4o2 for <cpan-bug+data-difference [...] hipster.bestpractical.com>; Fri, 20 Nov 2015 18:53:37 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 675B0240100 for <bug-data-difference [...] rt.cpan.org>; Fri, 20 Nov 2015 18:53:37 -0500 (EST)
Received: (qmail 5454 invoked by alias); 20 Nov 2015 23:53:36 -0000
Received: from smtp-out-no.shaw.ca (HELO smtp-out-no.shaw.ca) (64.59.134.12) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 20 Nov 2015 15:53:34 -0800
Received: from [127.0.0.1] ([24.69.36.146]) by shaw.ca with SMTP id zvUeZI7xtCKppzvUfZcnSF; Fri, 20 Nov 2015 16:53:29 -0700
Delivered-To: cpan-bug+data-difference [...] hipster.bestpractical.com
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
Subject: Undef key in first argument is ignored
Return-Path: <peter [...] psdt.com>
X-RT-Mail-Extension: data-difference
X-Original-To: cpan-bug+data-difference [...] hipster.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
Date: Fri, 20 Nov 2015 15:53:20 -0800
X-Spam-Level:
To: bug-Data-Difference [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Peter Scott <Peter [...] PSDT.com>
X-RT-Original-Encoding: utf-8
X-RT-Interface: Email
Content-Length: 1998
Download (untitled) / with headers
text/plain 1.9k
% perl -MData::Difference=data_diff -MData::Dumper -e 'print Dumper $_ for data_diff {z=>undef}, {z=>"foo"}' % perl -MData::Difference=data_diff -MData::Dumper -e 'print Dumper $_ for data_diff {z=>"foo"}, {z=>undef}' $VAR1 = { 'a' => 'foo', 'b' => undef, 'path' => [ 'z' ] }; The first one should produce this result but shows no difference: $VAR1 = { 'a' => undef, 'b' => 'foo', 'path' => [ 'z' ] }; This should do it: *** /usr/local/lib/perl5/site_perl/5.18.1/Data/Difference.pm.orig 2015-11-20 15:43:25.000000000 -0800 --- /usr/local/lib/perl5/site_perl/5.18.1/Data/Difference.pm 2015-11-20 15:52:57.000000000 -0800 *************** *** 50,56 **** push @diff, {path => [@path, $k], a => $a->{$k}, b => $b->{$k}}; } } ! elsif (defined $a->{$k} ? defined $b->{$k} ? $b->{$k} ne $a->{$k} : 1 : 0) { push @diff, {path => [@path, $k], a => $a->{$k}, b => $b->{$k}}; } } --- 50,56 ---- push @diff, {path => [@path, $k], a => $a->{$k}, b => $b->{$k}}; } } ! elsif (defined $a->{$k} ? defined $b->{$k} ? $b->{$k} ne $a->{$k} : 1 : defined $b) { push @diff, {path => [@path, $k], a => $a->{$k}, b => $b->{$k}}; } } *************** *** 80,86 **** push @diff, {path => [@path, $i], a => $a->[$i], b => $b->[$i]}; } } ! elsif (defined $a->[$i] ? defined $b->[$i] ? $b->[$i] ne $a->[$i] : 1 : 0) { push @diff, {path => [@path, $i], a => $a->[$i], b => $b->[$i]}; } } --- 80,86 ---- push @diff, {path => [@path, $i], a => $a->[$i], b => $b->[$i]}; } } ! elsif (defined $a->[$i] ? defined $b->[$i] ? $b->[$i] ne $a->[$i] : 1 : defined $b->[$i]) { push @diff, {path => [@path, $i], a => $a->[$i], b => $b->[$i]}; } }
MIME-Version: 1.0
X-Spam-Status: No, score=-4.725 tagged_above=-99.9 required=10 tests=[AWL=1.875, BAYES_00=-1.9, FROM_OUR_RT=-4, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
In-Reply-To: <rt-4.0.18-32266-1448063621-1531.109262-3-0 [...] rt.cpan.org>
X-Cmae-Envelope: MS4wfKsKHRbMO5I5DmgNrGgEqcA0uhYZAs8o/hAgz1HUqKGKSpYGUZ2xMLuWMywi7V2y/R2MII4U5JuXPk3+ELJcOQN6S3RI+ffKJd7PI3ZFzqlu4qtZahI1 wD9YIOfwKiQFq3p52pb+JvE/u1mOLR8Zi529WYwNYWAwIVt3fSUw6P/l
X-Spam-Flag: NO
X-Antivirus-Status: Clean
X-Authority-Analysis: v=2.1 cv=DNsvm35b c=1 sm=1 tr=0 a=IvP8ZCTvA+e9YmKUWTLiTw==:117 a=IvP8ZCTvA+e9YmKUWTLiTw==:17 a=eNcD7ojaAAAA:8 a=4nGKzdA1AAAA:8 a=IkcTkHD0fZMA:10 a=2hFmSin6qX4doUPCxOQA:9 a=QEXdDO2ut3YA:10
X-RT-Interface: API
References: <RT-Ticket-109262 [...] rt.cpan.org> <564FB270.4000503 [...] PSDT.com> <rt-4.0.18-32266-1448063621-1531.109262-3-0 [...] rt.cpan.org>
X-Antivirus: avast! (VPS 151120-1, 11/20/2015), Outbound message
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <564FB4EE.5010100 [...] PSDT.com>
content-type: text/plain; charset="utf-8"; format="flowed"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -4.725
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 784FD2402CF for <cpan-bug+data-difference [...] hipster.bestpractical.com>; Fri, 20 Nov 2015 19:04:21 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9WF2H54sHUdm for <cpan-bug+data-difference [...] hipster.bestpractical.com>; Fri, 20 Nov 2015 19:04:20 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 341EB240100 for <bug-data-difference [...] rt.cpan.org>; Fri, 20 Nov 2015 19:04:20 -0500 (EST)
Received: (qmail 5928 invoked by alias); 21 Nov 2015 00:04:19 -0000
Received: from smtp-out-so.shaw.ca (HELO smtp-out-so.shaw.ca) (64.59.136.139) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 20 Nov 2015 16:04:11 -0800
Received: from [127.0.0.1] ([24.69.36.146]) by shaw.ca with SMTP id zvewZ4xJRaHqmzvexZXU5V; Fri, 20 Nov 2015 17:04:07 -0700
Delivered-To: cpan-bug+data-difference [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #109262] AutoReply: Undef key in first argument is ignored
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
Return-Path: <peter [...] psdt.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+data-difference [...] hipster.bestpractical.com
X-RT-Mail-Extension: data-difference
Date: Fri, 20 Nov 2015 16:03:58 -0800
X-Spam-Level:
To: bug-Data-Difference [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Peter Scott <Peter [...] PSDT.com>
RT-Message-ID: <rt-4.0.18-18244-1448064262-1649.109262-0-0 [...] rt.cpan.org>
Content-Length: 1438
Download (untitled) / with headers
text/plain 1.4k
Sorry, slight bug in patch, fix: *** /usr/local/lib/perl5/site_perl/5.18.1/Data/Difference.pm.orig 2015-11-20 15:43:25.000000000 -0800 --- /usr/local/lib/perl5/site_perl/5.18.1/Data/Difference.pm 2015-11-20 16:02:57.000000000 -0800 *************** *** 50,56 **** push @diff, {path => [@path, $k], a => $a->{$k}, b => $b->{$k}}; } } ! elsif (defined $a->{$k} ? defined $b->{$k} ? $b->{$k} ne $a->{$k} : 1 : 0) { push @diff, {path => [@path, $k], a => $a->{$k}, b => $b->{$k}}; } } --- 50,56 ---- push @diff, {path => [@path, $k], a => $a->{$k}, b => $b->{$k}}; } } ! elsif (defined $a->{$k} ? defined $b->{$k} ? $b->{$k} ne $a->{$k} : 1 : defined $b->{$k}) { push @diff, {path => [@path, $k], a => $a->{$k}, b => $b->{$k}}; } } *************** *** 80,86 **** push @diff, {path => [@path, $i], a => $a->[$i], b => $b->[$i]}; } } ! elsif (defined $a->[$i] ? defined $b->[$i] ? $b->[$i] ne $a->[$i] : 1 : 0) { push @diff, {path => [@path, $i], a => $a->[$i], b => $b->[$i]}; } } --- 80,86 ---- push @diff, {path => [@path, $i], a => $a->[$i], b => $b->[$i]}; } } ! elsif (defined $a->[$i] ? defined $b->[$i] ? $b->[$i] ne $a->[$i] : 1 : defined $b->[$i]) { push @diff, {path => [@path, $i], a => $a->[$i], b => $b->[$i]}; } }


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.