Element/ListItem.pm

filter: Statementstmt 100% 21 / 21 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 50.0% 1 / 2 totaltotal 93.7% 30 / 32 CC 3 SCAR 6.3
CC
3
Cov
96%
header_as_string
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« ElementRole/Inline.pm ↑ Summary ElementRole/Block.pm »
1 package Org::Element::ListItem;
2  
3 7 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use locale;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 7 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 7 extends 'Org::Element';
7  
8 7 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
9 7 our $DATE = '2026-07-21'; # DATE
10 7 our $DIST = 'Org-Parser'; # DIST
11 7 our $VERSION = '0.563'; # VERSION
12  
13 7 has bullet => (is => 'rw');
14 7 has check_state => (is => 'rw');
15 7 has desc_term => (is => 'rw');
16  
17 3 ▶sub header_as_string {
Subroutine header_as_string: called CC=3 SCAR=11.1
Pod undocumented
18 3 my ($self) = @_;
19 3 ▶ join("",
Branch: 2 branches
BranchTrueFalseTotal
defined $self->check_state ? : 0 3 3
defined $self->desc_term ? : 2 1 3
20 $self->parent->indent,
21 $self->bullet, " ",
22 defined($self->check_state) ? "[".$self->check_state."]" : "",
23 defined($self->desc_term) ? $self->desc_term->as_string . " ::" : "",
24 );
25 }
26  
27 2 ▶sub as_string {
Subroutine as_string: called CC=1 SCAR=0.0
Pod documented
28 2 my ($self) = @_;
29 2 $self->header_as_string . $self->children_as_string;
30 }
31  
32 7 1;
33 # ABSTRACT: Represent Org list item
34  
35 __END__
« ElementRole/Inline.pm ↑ Summary ElementRole/Block.pm »