enable matching of empty string specs
[catagits/Web-Simple.git] / lib / Web / Dispatch.pm
index 9c5559f..69df554 100644 (file)
@@ -33,7 +33,7 @@ sub call {
 
 sub _dispatch {
   my ($self, $env, @match) = @_;
-  while (my $try = shift @match) {
+  while (defined(my $try = shift @match)) {
 
     return $try if ref($try) eq 'ARRAY';
     if (ref($try) eq 'HASH') {