Skip Menu |

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

Report information
The Basics
Id: 101884
Status: resolved
Priority: 0/
Queue: Data-Validate-Struct

Owner: Nobody in particular
Requestors: mathieu.bivert [...]

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

CC: tlinden [...]
MIME-Version: 1.0
X-Spam-Status: No, score=-2.698 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
X-Spam-Flag: NO
X-Virus-Checked: Checked
Content-Type: multipart/mixed; boundary="e89a8ffbae413f1797050e1ec109"
Message-ID: <CAENqR=ybpxuc-eN79sCL+Dvmr43Gsby2N9p4xJY=8mbzVo-q4g [...]>
X-Received: by with SMTP id gy7mr13118592igb.49.1422900137489; Mon, 02 Feb 2015 10:02:17 -0800 (PST)
X-Virus-Scanned: Debian amavisd-new at
X-Spam-Score: -2.698
Received: from localhost (localhost []) by (Postfix) with ESMTP id 4A065240488 for <cpan-bug+Data-Validate-Struct [...]>; Mon, 2 Feb 2015 13:02:29 -0500 (EST)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id r0nHZRX9qw6u for <cpan-bug+Data-Validate-Struct [...]>; Mon, 2 Feb 2015 13:02:27 -0500 (EST)
Received: from ( []) by (Postfix) with SMTP id 9968B240369 for <bug-Data-Validate-Struct [...]>; Mon, 2 Feb 2015 13:02:27 -0500 (EST)
Received: (qmail 30303 invoked by alias); 2 Feb 2015 18:02:27 -0000
Received: from (HELO ( by (qpsmtpd/0.28) with ESMTP; Mon, 02 Feb 2015 10:02:21 -0800
Received: by with SMTP id vy18so19292032iec.8 for <bug-Data-Validate-Struct [...]>; Mon, 02 Feb 2015 10:02:17 -0800 (PST)
Received: by with HTTP; Mon, 2 Feb 2015 10:02:17 -0800 (PST)
Authentication-Results: (amavisd-new); dkim=pass header.i= [...]
Delivered-To: cpan-bug+Data-Validate-Struct [...]
Subject: bugs and questions on Data::Validate::Struct
Return-Path: <mathieu.bivert [...]>
X-RT-Mail-Extension: data-validate-struct
X-Original-To: cpan-bug+Data-Validate-Struct [...]
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=v10gLhhgh5qgJdZz/+QfOYo9QtFilenM8a21qWhX2Jw=; b=SrWgiKPTiUTvBkF1vpcZIIcZWrJ3cO+dTPjSw+OUOWFy0SObs2E9bdP90Fy+hUgut/ 1neachBmk/E3qAT4uAU58i7wI8WliGOhMhnfOXEo0VJ9/zQ2IRlKn3GJsHzMwlMZxxxU 4WSSJFyjn/JwWBJJCIc+vObeZ6ExNVUwF5J2vMO0S+nMT2EukwTEvFvHTA13Qlnkm+vB UvcHCGaDUIzZVgBVLlYc36tq85FRD+a8a4EHLBaX8q/t0sDb6/N5t0R85nydZxpAbysH oNsbjCUIzUkCwFCB3k1uFtg5/59UUOZJcvDyWjOV0VngrCuCYNNMYy5cpFLt66IqUFn0 QOkQ==
Date: Mon, 2 Feb 2015 19:02:17 +0100
To: bug-Data-Validate-Struct [...]
From: Mathieu Bivert <mathieu.bivert [...]>
X-RT-Interface: Email
Content-Length: 0
Content-Type: multipart/alternative; boundary="e89a8ffbae413f1791050e1ec107"
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 981
Download (untitled) / with headers
text/plain 981b
Hi, 1/ In^sub _trim, the substitution is missing a g flag. Here's a snippet: (saturn); perl -e '$_=" hello "; print "X${_}X\n"' X hello X (saturn); perl -e '$_=" hello "; s/^\s+|\s+$//; print "X${_}X\n"' Xhello X (saturn); perl -e '$_=" hello "; s/^\s+|\s+$//g; print "X${_}X\n"' XhelloX 2/ optional seems in-effective if the value of the key is undef (see attached 3/ In case an item has a value undef, 'undefined value …' is triggered. 4/ Please, find attached (t.patch) a sample diff(1) attached as workaround on the problems listed above. The attached file should trigger them all. 5/ is there any plan to have optional array or hash? or alternatively, is there any available hack around it ? The only solution that comes to my mind is to associate to each possible node a hash { types = @types, value = $reference_value }. But this is less handy to use, and requires changing the API :-) Thanks for your work and have a nice day, Mathieu
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 1641
X-Attachment-ID: f_i5o5zcv50
Content-Type: text/x-patch; charset="US-ASCII"; name="t.patch"
Content-Disposition: attachment; filename="t.patch"
Content-Transfer-Encoding: base64
X-RT-Original-Encoding: ascii
Content-Length: 1099
Download t.patch
text/x-diff 1k

Message body is not shown because sender requested not to inline it.

X-Attachment-ID: f_i5o5zcvr1
Content-Type: text/x-perl; charset="US-ASCII"; name=""
Content-Disposition: attachment; filename=""
Content-Transfer-Encoding: base64
X-RT-Original-Encoding: ascii
Content-Length: 358
text/x-perl 358b

Message body is not shown because sender requested not to inline it.

MIME-Version: 1.0
In-Reply-To: <CAENqR=ybpxuc-eN79sCL+Dvmr43Gsby2N9p4xJY=8mbzVo-q4g [...]>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <CAENqR=ybpxuc-eN79sCL+Dvmr43Gsby2N9p4xJY=8mbzVo-q4g [...]>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-6360-1423473848-1031.101884-0-0 [...]>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 46
Fixed in 0.10. Thanks for reporting! - Tom

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

Please report any issues with to