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 [...]
Subject: bugs and questions on Data::Validate::Struct
Date: Mon, 2 Feb 2015 19:02:17 +0100
To: bug-Data-Validate-Struct [...]
From: Mathieu Bivert <mathieu.bivert [...]>
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
Download t.patch
text/x-diff 1k

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

text/x-perl 358b

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

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