factor out match_not
[catagits/Web-Simple.git] / lib / Web / Dispatch / Parser.pm
index 69c510b..92aa9b6 100644 (file)
@@ -106,13 +106,7 @@ sub _parse_spec_section {
     # !something
 
     /\G!/gc and
-      return do {
-        my $match = $self->_parse_spec_section($_);
-        return sub {
-          return {} unless my @discard = $match->(@_);
-          return;
-        };
-      };
+      return match_not($self->_parse_spec_section($_));
 
     # ?<param spec>
     /\G\?/gc and