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