Commits

Anonymous committed 99ad6be

Extract a method.

  • Participants
  • Parent commits 0bd3c6b

Comments (0)

Files changed (1)

perl/modules/XML-Grammar-Fiction/lib/XML/Grammar/FictionBase/FromProto/Parser/XmlIterator.pm

     return;
 }
 
+sub _handle_specific_tag_event
+{
+    my ($self, $event) = @_;
+
+    my $tag_name = $event->tag();
+    my $type = $event->is_open() ? "open" : "close";
+
+    my $method = "_handle_${type}_${tag_name}";
+
+    $self->$method($event);
+
+    return 1;
+}
+
 sub _check_and_handle_tag_event
 {
     my ($self, $event) = @_;
     {
         if ($event->is_tag_of_name($tag_name))
         {
-            my $type = $event->is_open() ? "open" : "close";
-            
-            my $method = "_handle_${type}_${tag_name}";
-
-            $self->$method($event);
-
-            return 1;
+            return $self->_handle_specific_tag_event($event);
         }
     }