sub {} == undef proto, sub () {} == '' proto
Matt S Trout [Mon, 30 Nov 2009 22:17:20 +0000 (22:17 +0000)]
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
   );