line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XML::Grammar::Fiction::Struct::Tag; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
48
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
43
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
9
|
use MooX 'late'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
10
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
2064
|
use List::MoreUtils; |
|
2
|
|
|
|
|
12025
|
|
|
2
|
|
|
|
|
16
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = 'v0.14.12'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
has 'name' => (is => "rw", isa => "Str"); |
14
|
|
|
|
|
|
|
has 'line' => (is => "rw", isa => "Int"); |
15
|
|
|
|
|
|
|
has 'is_standalone' => (is => "rw", isa => "Bool"); |
16
|
|
|
|
|
|
|
has 'attrs' => (is => "rw", isa => "ArrayRef"); |
17
|
|
|
|
|
|
|
has 'children' => ( |
18
|
|
|
|
|
|
|
is => "rw", |
19
|
|
|
|
|
|
|
isa => "Maybe[ArrayRef]", |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub append_children |
23
|
|
|
|
|
|
|
{ |
24
|
0
|
|
|
0
|
1
|
|
my ($self, $children) = @_; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# This is an assert / sanity check. |
27
|
0
|
0
|
|
0
|
|
|
if (List::MoreUtils::any { !defined ($_) } @$children) |
|
0
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
{ |
29
|
0
|
|
|
|
|
|
Carp::confess("append_children with undef."); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
push @{$self->children()}, @$children; |
|
0
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
return; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub append_child |
38
|
|
|
|
|
|
|
{ |
39
|
0
|
|
|
0
|
1
|
|
my ($self, $child) = @_; |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
return $self->append_children( [ $child ] ); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub detach_children |
45
|
|
|
|
|
|
|
{ |
46
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
my $children = $self->children(); |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
$self->children(undef); |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
return $children; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
package XML::Grammar::Fiction::Struct::Tag::Para; |
56
|
|
|
|
|
|
|
|
57
|
2
|
|
|
2
|
|
1241
|
use MooX 'late'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
18
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
extends("XML::Grammar::Fiction::Struct::Tag"); |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
1; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
__END__ |