From: Dave Rolsky Date: Mon, 19 Jan 2009 17:36:01 +0000 (+0000) Subject: Make the constraint for this subtype much dumber, to avoid failing X-Git-Tag: 0.65~18 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9d131fc1d032aea3f40ee0dce1cd9d8e96919b80;p=gitmo%2FMoose.git Make the constraint for this subtype much dumber, to avoid failing tests given some random valid path on someone's file system that we didn't account for. --- diff --git a/t/100_bugs/011_DEMOLISH_eats_exceptions.t b/t/100_bugs/011_DEMOLISH_eats_exceptions.t index 31edb46..f785283 100644 --- a/t/100_bugs/011_DEMOLISH_eats_exceptions.t +++ b/t/100_bugs/011_DEMOLISH_eats_exceptions.t @@ -11,8 +11,10 @@ use Moose::Util::TypeConstraints; subtype 'FilePath' => as 'Str' - => where { $_ =~ m#^(/[a-zA-Z0-9_.-]+)+/?$# - || $_ =~ m#^([c-zC-Z]:/[a-zA-Z0-9_.-]+)# }; + # This used to try to _really_ check for a valid Unix or Windows + # path, but the regex wasn't quite right, and all we care about + # for the tests is that it rejects '/' + => where { $_ ne '/' }; { package Baz; use Moose;