From: Matt S Trout Date: Mon, 30 Nov 2009 21:16:59 +0000 (+0000) Subject: fix Application.pm to handle empty sub protos correctly X-Git-Tag: v0.003~26 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FWeb-Simple.git;a=commitdiff_plain;h=aad20079cd5d883da0892b6ffa9337e4f4e32631 fix Application.pm to handle empty sub protos correctly --- diff --git a/Changes b/Changes index 49f7659..037b20e 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,6 @@ Change log for Web::Simple + - fix dispatcher construction to recognise '' as no proto (we expected undef) - plackup support, as_psgi_app method - Fix SYNOPSIS diff --git a/lib/Web/Simple/Application.pm b/lib/Web/Simple/Application.pm index 70339fa..f146419 100644 --- a/lib/Web/Simple/Application.pm +++ b/lib/Web/Simple/Application.pm @@ -171,7 +171,7 @@ sub _build_dispatcher_from_spec { my $proto = prototype $spec; my $parser = $class->_build_dispatch_parser; my $matcher = ( - defined($proto) + length($proto) ? $parser->parse_dispatch_specification($proto) : undef );