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