File Coverage

lib/Pod/Simple/PullParserToken.pm
Criterion Covered Total %
statement 9 11 81.8
branch n/a
condition 0 3 0.0
subroutine 6 7 85.7
pod 5 6 83.3
total 20 27 74.0


line stmt bran cond sub pod time code
1              
2             require 5;
3             package Pod::Simple::PullParserToken;
4             # Base class for tokens gotten from Pod::Simple::PullParser's $parser->get_token
5             @ISA = ();
6             $VERSION = '3.42';
7 10     10   66 use strict;
  10         20  
  10         1654  
8              
9             sub new { # Class->new('type', stuff...); ## Overridden in derived classes anyway
10 0     0 0 0 my $class = shift;
11 0   0     0 return bless [@_], ref($class) || $class;
12             }
13              
14 698     698 1 2722 sub type { $_[0][0] } # Can't change the type of an object
15 51     51 1 235 sub dump { Pod::Simple::pretty( [ @{ $_[0] } ] ) }
  51         132  
16              
17 357     357 1 1291 sub is_start { $_[0][0] eq 'start' }
18 212     212 1 771 sub is_end { $_[0][0] eq 'end' }
19 336     336 1 924 sub is_text { $_[0][0] eq 'text' }
20              
21             1;
22             __END__