[SCM] libtype-tiny-perl Debian packaging branch, master, updated. debian/0.016-1-48-ga7f6748
Toby Inkster
mail at tobyinkster.co.uk
Mon Jul 29 12:54:58 UTC 2013
The following commit has been merged in the master branch:
commit a96aae83389da9e9782f76af842f869be863c81b
Author: Toby Inkster <mail at tobyinkster.co.uk>
Date: Fri Jul 19 08:04:47 2013 +0100
simpler pattern for custom error messages
diff --git a/lib/Type/Utils.pm b/lib/Type/Utils.pm
index 0fe2615..f134327 100644
--- a/lib/Type/Utils.pm
+++ b/lib/Type/Utils.pm
@@ -593,10 +593,7 @@ Generate a custom error message when a value fails validation.
as Int,
where { $_ % 2 == 0 },
message {
- if (Int->check($_))
- { "$_ is an integer, but not even" }
- else
- { "$_ is not an integer" }
+ Int->validate($_) or "$_ is not divisible by two";
};
=item C<< inline_as { BLOCK } >>
--
libtype-tiny-perl Debian packaging
More information about the Pkg-perl-cvs-commits
mailing list