enable matching of empty string specs
[catagits/Web-Simple.git] / lib / Web / Dispatch / Parser.pm
index 8e66a05..6ebc51e 100644 (file)
@@ -35,6 +35,7 @@ sub parse {
 
 sub _parse_spec {
   my ($self, $spec, $nested) = @_;
+  return sub { {} } unless length($spec);
   for ($_[1]) {
     my @match;
     PARSE: { do {