Skip Menu |

This queue is for tickets about the AppConfig CPAN distribution.

Report information
The Basics
Id: 23746
Status: new
Priority: 0/
Queue: AppConfig

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

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



Subject: [PATCH] Support for qr// in VALIDATE
In AppConfig-1.56, the VALIDATE argument supports code references or strings, the string assumed to be a regular expression. This patch allows AppConfig to support qr// for VALIDATE. $ perl -v This is perl, v5.8.8 built for x86_64-linux-thread-multi $ perl -le '$re = qr//; print ref $re' Regexp I have not investigated if this is correct for other versions of Perl.
Subject: validate.diff
--- AppConfig/State.pm 2006-10-26 06:48:51.000000000 -0700 +++ AppConfig/State.pm~ 2006-12-02 17:01:21.448237000 -0800 @@ -691,7 +691,7 @@ }; # non-ref (i.e. scalar) - ref($validator) || do { + (ref($validator) eq 'Regexp' || !ref($validator)) && do { # not a ref - assume it's a regex return $value =~ /$validator/; };