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

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

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



CC: tlinden [...] cpan.org
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 [...] mail.gmail.com>
X-Received: by 10.50.107.7 with SMTP id gy7mr13118592igb.49.1422900137489; Mon, 02 Feb 2015 10:02:17 -0800 (PST)
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -2.698
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 4A065240488 for <cpan-bug+Data-Validate-Struct [...] hipster.bestpractical.com>; Mon, 2 Feb 2015 13:02:29 -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 r0nHZRX9qw6u for <cpan-bug+Data-Validate-Struct [...] hipster.bestpractical.com>; Mon, 2 Feb 2015 13:02:27 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 9968B240369 for <bug-Data-Validate-Struct [...] rt.cpan.org>; Mon, 2 Feb 2015 13:02:27 -0500 (EST)
Received: (qmail 30303 invoked by alias); 2 Feb 2015 18:02:27 -0000
Received: from mail-ie0-f177.google.com (HELO mail-ie0-f177.google.com) (209.85.223.177) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Mon, 02 Feb 2015 10:02:21 -0800
Received: by mail-ie0-f177.google.com with SMTP id vy18so19292032iec.8 for <bug-Data-Validate-Struct [...] rt.cpan.org>; Mon, 02 Feb 2015 10:02:17 -0800 (PST)
Received: by 10.64.120.99 with HTTP; Mon, 2 Feb 2015 10:02:17 -0800 (PST)
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Delivered-To: cpan-bug+Data-Validate-Struct [...] hipster.bestpractical.com
Subject: bugs and questions on Data::Validate::Struct
Return-Path: <mathieu.bivert [...] gmail.com>
X-RT-Mail-Extension: data-validate-struct
X-Original-To: cpan-bug+Data-Validate-Struct [...] hipster.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; 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
X-Spam-Level:
To: bug-Data-Validate-Struct [...] rt.cpan.org
From: Mathieu Bivert <mathieu.bivert [...] gmail.com>
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 Struct.pm:/^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 t.pl) 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 t.pl 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="t.pl"
Content-Disposition: attachment; filename="t.pl"
Content-Transfer-Encoding: base64
X-RT-Original-Encoding: ascii
Content-Length: 358
Download t.pl
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 [...] mail.gmail.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <CAENqR=ybpxuc-eN79sCL+Dvmr43Gsby2N9p4xJY=8mbzVo-q4g [...] mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-6360-1423473848-1031.101884-0-0 [...] rt.cpan.org>
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 Perl.org infrastructure.

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