cleanup match_ usage
Matt S Trout [Wed, 15 Dec 2010 12:45:04 +0000 (12:45 +0000)]
lib/Web/Dispatch/Parser.pm

index 92aa9b6..a4c2640 100644 (file)
@@ -86,7 +86,7 @@ sub _parse_spec_section {
     # GET POST PUT HEAD ...
 
     /\G([A-Z]+)/gc and
-      return $self->_http_method_match($_, $1);
+      return match_method($1);
 
     # /...
 
@@ -96,7 +96,7 @@ sub _parse_spec_section {
     # .* and .html
 
     /\G\.(\*|\w+)/gc and
-      return $self->_url_extension_match($_, $1);
+      return match_extension($1);
 
     # (...)
 
@@ -119,11 +119,6 @@ sub _parse_spec_section {
   return; # () will trigger the blam in our caller
 }
 
-sub _http_method_match {
-  my ($self, $str, $method) = @_;
-  match_method($method);
-}
-
 sub _url_path_match {
   my ($self) = @_;
   for ($_[1]) {
@@ -171,11 +166,6 @@ sub _url_path_segment_match {
   return ();
 }
 
-sub _url_extension_match {
-  my ($self, $str, $extension) = @_;
-  match_extension($extension);
-}
-
 sub _parse_param_handler {
   my ($self, $spec, $type) = @_;