sub {} == undef proto, sub () {} == '' proto
[catagits/Web-Simple.git] / lib / Web / Simple / Application.pm
index f146419..99a59a3 100644 (file)
@@ -171,7 +171,7 @@ sub _build_dispatcher_from_spec {
   my $proto = prototype $spec;
   my $parser = $class->_build_dispatch_parser;
   my $matcher = (
-    length($proto)
+    defined($proto) && length($proto)
       ? $parser->parse_dispatch_specification($proto)
       : undef
   );