File Coverage

blib/lib/Org/Element/TimeRange.pm
Criterion Covered Total %
statement 8 12 66.6
branch 0 2 0.0
condition n/a
subroutine 3 5 60.0
pod 2 2 100.0
total 13 21 61.9


line stmt bran cond sub pod time code
1              
2             use 5.010;
3 3     3   918 use locale;
  3         10  
4 3     3   19 use Moo;
  3         3  
  3         15  
5 3     3   110 extends 'Org::Element';
  3         6  
  3         29  
6             with 'Org::ElementRole';
7             with 'Org::ElementRole::Inline';
8              
9             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
10             our $DATE = '2022-06-23'; # DATE
11             our $DIST = 'Org-Parser'; # DIST
12             our $VERSION = '0.558'; # VERSION
13              
14             has ts1 => (is => 'rw');
15             has ts2 => (is => 'rw');
16              
17             my ($self) = @_;
18             return $self->_str if $self->_str;
19 0     0 1   join("",
20 0 0         $self->ts1->as_string,
21 0           "--",
22             $self->ts2->as_string
23             );
24             }
25              
26             goto \&as_string;
27             }
28              
29 0     0 1   1;
30             # ABSTRACT: Represent Org time range (TS1--TS2)
31              
32              
33             =pod
34              
35             =encoding UTF-8
36              
37             =head1 NAME
38              
39             Org::Element::TimeRange - Represent Org time range (TS1--TS2)
40              
41             =head1 VERSION
42              
43             This document describes version 0.558 of Org::Element::TimeRange (from Perl distribution Org-Parser), released on 2022-06-23.
44              
45             =head1 DESCRIPTION
46              
47             Derived from L<Org::Element>.
48              
49             =head1 ATTRIBUTES
50              
51             =head2 ts1 => TIMESTAMP ELEMENT
52              
53             Starting timestamp.
54              
55             =head2 ts2 => TIMESTAMP ELEMENT
56              
57             Ending timestamp.
58              
59             =head1 METHODS
60              
61             =head2 as_string => str
62              
63             From L<Org::Element>.
64              
65             =head2 as_text => str
66              
67             From L<Org::ElementRole::Inline>.
68              
69             =head1 HOMEPAGE
70              
71             Please visit the project's homepage at L<https://metacpan.org/release/Org-Parser>.
72              
73             =head1 SOURCE
74              
75             Source repository is at L<https://github.com/perlancar/perl-Org-Parser>.
76              
77             =head1 AUTHOR
78              
79             perlancar <perlancar@cpan.org>
80              
81             =head1 CONTRIBUTING
82              
83              
84             To contribute, you can send patches by email/via RT, or send pull requests on
85             GitHub.
86              
87             Most of the time, you don't need to build the distribution yourself. You can
88             simply modify the code, then test via:
89              
90             % prove -l
91              
92             If you want to build the distribution (e.g. to try to install it locally on your
93             system), you can install L<Dist::Zilla>,
94             L<Dist::Zilla::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
95             Dist::Zilla plugin and/or Pod::Weaver::Plugin. Any additional steps required
96             beyond that are considered a bug and can be reported to me.
97              
98             =head1 COPYRIGHT AND LICENSE
99              
100             This software is copyright (c) 2022, 2021, 2020, 2019, 2017, 2016, 2015, 2014, 2013, 2012, 2011 by perlancar <perlancar@cpan.org>.
101              
102             This is free software; you can redistribute it and/or modify it under
103             the same terms as the Perl 5 programming language system itself.
104              
105             =head1 BUGS
106              
107             Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Org-Parser>
108              
109             When submitting a bug or request, please include a test-file or a
110             patch to an existing test-file that illustrates the bug or desired
111             feature.
112              
113             =cut