Commits

Anonymous committed d771537

Extract is_open().

Comments (0)

Files changed (3)

perl/modules/XML-Grammar-Fiction/lib/XML/Grammar/Fiction/Event.pm

     return ($self->_has_tag() && ($self->tag() eq $name));
 }
 
+sub is_open
+{
+    my $self = shift;
+
+    return ($self->type() eq "open");
+}
+
 1;
 
 =head2 $event->is_tag_of_name($name)
 
 Determines if the $event is a tag and of name $name.
 
+=head2 $event->is_open()
+
+Returns true if the $event 's type is "open".
+
 =head2 $self->meta()
 
 Leftover from Moose.

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

     my ($self, $event) = @_;
 
     return
-          $event->type() eq "open"
+          $event->is_open()
         ? $self->_handle_open_para($event)
         : $self->_handle_close_para($event)
         ;

perl/modules/XML-Grammar-Fiction/lib/XML/Grammar/Screenplay/FromProto/Parser/QnD.pm

     my ($self, $event) = @_;
 
     return
-        $event->type() eq "open"
+        $event->is_open()
         ? $self->_open_saying($event)
         : $self->_close_saying();
 }