Element/Footnote.pm

filter: Statementstmt 88.8% 24 / 27 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 71.4% 5 / 7 Podpod 66.6% 2 / 3 totaltotal 73.8% 31 / 42 CC 3 SCAR 15.6
CC
3
Cov
77%
as_string
12.0
as_text
2.0
BEGIN
1.0
CRAP 4.8
« Element/Table.pm ↑ Summary Element.pm »
1 package Org::Element::Footnote;
2  
3 4 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use locale;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use Log::ger;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 4 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 4 extends 'Org::Element';
8 4 with 'Org::ElementRole';
9 4 with 'Org::ElementRole::Inline';
10  
11 4 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
12 4 our $DATE = '2026-07-21'; # DATE
13 4 our $DIST = 'Org-Parser'; # DIST
14 4 our $VERSION = '0.563'; # VERSION
15  
16 4 has name => (is => 'rw');
17 4 has is_ref => (is => 'rw');
18 4 has def => (is => 'rw');
19  
20 5 ▶sub BUILD {
Subroutine BUILD: called CC=1 SCAR=0.0
Pod undocumented
21 5 my ($self, $args) = @_;
22 5 log_trace("name = %s", $self->name);
23 }
24  
25 0 ▶sub as_string {
Subroutine as_string: not called CC=3 SCAR=24.8
Pod documented
26 0 my ($self) = @_;
27  
28 0 ▶ join("",
Branch: 1 branch
BranchTrueFalseTotal
defined $self->def ? : 0 0 0
Condition0%0/2
$self->name // ""
l!l
00
MC/DC0%0/1
$self->name // ""
$self->name
Truth table0%0/2
A
A= $self->name
Aresult
11
00
29 "[fn:", ($self->name // ""),
30 defined($self->def) ? ":".$self->def->as_string : "",
31 "]");
32 }
33  
34 0 ▶sub as_text {
Subroutine as_text: not called CC=1 SCAR=6.9
Pod documented
35 0 goto \&as_string;
36 }
37  
38 4 1;
39 # ABSTRACT: Represent Org footnote reference and/or definition
40  
41 __END__
« Element/Table.pm ↑ Summary Element.pm »