| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
17
|
|
|
17
|
|
269
|
use v5.14; |
|
|
17
|
|
|
|
|
76
|
|
|
2
|
17
|
|
|
17
|
|
108
|
use warnings; |
|
|
17
|
|
|
|
|
46
|
|
|
|
17
|
|
|
|
|
726
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Test::BDD::Cucumber::Model::Document 0.85; |
|
5
|
|
|
|
|
|
|
|
|
6
|
17
|
|
|
17
|
|
118
|
use Moo; |
|
|
17
|
|
|
|
|
47
|
|
|
|
17
|
|
|
|
|
141
|
|
|
7
|
17
|
|
|
17
|
|
6146
|
use Types::Standard qw( Str ArrayRef InstanceOf ); |
|
|
17
|
|
|
|
|
50
|
|
|
|
17
|
|
|
|
|
179
|
|
|
8
|
17
|
|
|
17
|
|
21561
|
use Test::BDD::Cucumber::Model::Line; |
|
|
17
|
|
|
|
|
62
|
|
|
|
17
|
|
|
|
|
3790
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Test::BDD::Cucumber::Model::Document - Model to represent a feature file on disk or in memory |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 VERSION |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
version 0.85 |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Model to represent a feature file on disk or in memory |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head2 filename |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
The filename from which the document was loaded. |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=cut |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
has 'filename' => ( is => 'ro', isa => Str ); |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head2 content |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
The file contents, as a string |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=cut |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
has 'content' => ( is => 'ro', isa => Str ); |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head2 lines |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
The file contents, as an arrayref of L |
|
43
|
|
|
|
|
|
|
objects |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=cut |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
has 'lines' => ( |
|
48
|
|
|
|
|
|
|
is => 'rw', |
|
49
|
|
|
|
|
|
|
default => sub { [] }, |
|
50
|
|
|
|
|
|
|
isa => ArrayRef[InstanceOf['Test::BDD::Cucumber::Model::Line']] |
|
51
|
|
|
|
|
|
|
); |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 OTHER |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 BUILD |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
The instantiation populates C by splitting the input on newlines. |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
# Create lines |
|
62
|
|
|
|
|
|
|
sub BUILD { |
|
63
|
48
|
|
|
48
|
1
|
1717
|
my $self = shift; |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
# Reset any content that was in lines |
|
66
|
48
|
|
|
|
|
164
|
my $counter = 0; |
|
67
|
|
|
|
|
|
|
|
|
68
|
48
|
|
|
|
|
930
|
for my $line ( split( /\n/, $self->content ) ) { |
|
69
|
1251
|
|
|
|
|
27491
|
my $obj = Test::BDD::Cucumber::Model::Line->new( |
|
70
|
|
|
|
|
|
|
{ |
|
71
|
|
|
|
|
|
|
number => ++$counter, |
|
72
|
|
|
|
|
|
|
document => $self, |
|
73
|
|
|
|
|
|
|
raw_content => $line |
|
74
|
|
|
|
|
|
|
} |
|
75
|
|
|
|
|
|
|
); |
|
76
|
1251
|
|
|
|
|
122317
|
push( @{ $self->lines }, $obj ); |
|
|
1251
|
|
|
|
|
21495
|
|
|
77
|
|
|
|
|
|
|
} |
|
78
|
|
|
|
|
|
|
} |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 AUTHOR |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Peter Sergeant C |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 LICENSE |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Copyright 2019-2023, Erik Huelsmann |
|
87
|
|
|
|
|
|
|
Copyright 2011-2019, Peter Sergeant; Licensed under the same terms as Perl |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=cut |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
1; |