File Coverage

blib/lib/RDF/Trine/Parser/Turtle/Token.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 2 2 100.0
total 24 24 100.0


line stmt bran cond sub pod time code
1             package RDF::Trine::Parser::Turtle::Token;
2              
3 68     68   1682 use 5.010;
  68         266  
4 68     68   387 use strict;
  68         156  
  68         1575  
5 68     68   344 use warnings;
  68         196  
  68         1987  
6 68     68   27554 use MooseX::ArrayRef;
  68         1388190  
  68         305  
7              
8             has type => ( is => 'ro', );
9             has start_line => ( is => 'ro', );
10             has start_column => ( is => 'ro', );
11             has line => ( is => 'ro', );
12             has column => ( is => 'ro', );
13             has args => ( is => 'ro', );
14              
15             =begin private
16              
17             =item C<< value >>
18              
19             Returns the token value.
20              
21             =cut
22              
23             sub value {
24 3174     3174 1 5733 my $self = shift;
25 3174         78467 my $args = $self->args;
26 3174         14924 return $args->[0];
27             }
28              
29             =item C<< fast_constructor ( $type, $line, $col, \@args ) >>
30              
31             Returns a new token object.
32              
33             =cut
34              
35             # This constructor relies on the list of attributes not changing order!
36             sub fast_constructor {
37 9482     9482 1 17475 my $class = shift;
38 9482         45483 bless \@_, $class;
39             }
40              
41             __PACKAGE__->meta->make_immutable;
42              
43             1;
44              
45             =end private
46              
47             =cut