Element/RadioTarget.pm

filter: Statementstmt 88.4% 23 / 26 Branchbran 100% 2 / 2 Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 66.6% 4 / 6 Podpod 66.6% 2 / 3 totaltotal 80.0% 32 / 40 CC 3 SCAR 6.9
CC
3
Cov
87%
BUILD
3.0
as_string
2.0
as_text
2.0
CRAP 2.0
« Element/TableRow.pm ↑ Summary ElementRole/Inline.pm »
1 package Org::Element::RadioTarget;
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 Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 4 extends 'Org::Element';
7 4 with 'Org::ElementRole';
8 4 with 'Org::ElementRole::Inline';
9  
10 4 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
11 4 our $DATE = '2026-07-21'; # DATE
12 4 our $DIST = 'Org-Parser'; # DIST
13 4 our $VERSION = '0.563'; # VERSION
14  
15 4 has target => (is => 'rw');
16  
17 4 ▶sub BUILD {
Subroutine BUILD: called CC=3 SCAR=11.0
Pod undocumented
18 4 my ($self, $args) = @_;
19 4 ▶ my $pass = $args->{pass} // 1;
Condition50%1/2
$args->{"pass"} // 1
l!l
40
MC/DC0%0/1
$args->{"pass"} // 1
$args->{"pass"}
Truth table50%1/2
A
A= $args->{"pass"}
Aresult
11
00
20 4 my $doc = $self->document;
21 4 ▶ if ($pass == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($pass == 1) 2 2 4
22 2 push @{ $doc->radio_targets },
23 $self->target;
24 }
25 }
26  
27 0 ▶sub as_string {
Subroutine as_string: not called CC=1 SCAR=6.9
Pod documented
28 0 my ($self) = @_;
29 0 join("",
30 "<<<", $self->target, ">>>");
31 }
32  
33 0 ▶sub as_text {
Subroutine as_text: not called CC=1 SCAR=6.9
Pod documented
34 0 goto \&as_string;
35 }
36  
37 4 1;
38 # ABSTRACT: Represent Org radio target
39  
40 __END__
« Element/TableRow.pm ↑ Summary ElementRole/Inline.pm »