Element/TimeRange.pm

filter: Statementstmt 81.8% 18 / 22 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 100% 2 / 2 totaltotal 74.1% 23 / 31 CC 2 SCAR 10.4
CC
2
Cov
75%
as_string
6.0
as_text
2.0
BEGIN
1.0
CRAP 2.8
« Element/Target.pm ↑ Summary Element/Link.pm »
1 package Org::Element::TimeRange;
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 ts1 => (is => 'rw');
16 4 has ts2 => (is => 'rw');
17  
18 0 ▶sub as_string {
Subroutine as_string: not called CC=2 SCAR=17.9
Pod documented
19 0 my ($self) = @_;
20 0 ▶ return $self->_str if $self->_str;
Branch: 1 branch
BranchTrueFalseTotal
if $self->_str 0 0 0
21 0 join("",
22 $self->ts1->as_string,
23 "--",
24 $self->ts2->as_string
25 );
26 }
27  
28 0 ▶sub as_text {
Subroutine as_text: not called CC=1 SCAR=6.9
Pod documented
29 0 goto \&as_string;
30 }
31  
32 4 1;
33 # ABSTRACT: Represent Org time range (TS1--TS2)
34  
35 __END__
« Element/Target.pm ↑ Summary Element/Link.pm »