line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Org::Element::List; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
1129
|
use 5.010; |
|
6
|
|
|
|
|
29
|
|
4
|
6
|
|
|
6
|
|
34
|
use locale; |
|
6
|
|
|
|
|
23
|
|
|
6
|
|
|
|
|
37
|
|
5
|
6
|
|
|
6
|
|
192
|
use Moo; |
|
6
|
|
|
|
|
21
|
|
|
6
|
|
|
|
|
46
|
|
6
|
|
|
|
|
|
|
extends 'Org::Element'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
9
|
|
|
|
|
|
|
our $DATE = '2023-08-05'; # DATE |
10
|
|
|
|
|
|
|
our $DIST = 'Org-Parser'; # DIST |
11
|
|
|
|
|
|
|
our $VERSION = '0.560'; # VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
has indent => (is => 'rw'); |
14
|
|
|
|
|
|
|
has type => (is => 'rw'); |
15
|
|
|
|
|
|
|
has bullet_style => (is => 'rw'); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub items { |
18
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
19
|
0
|
|
|
|
|
|
my @items; |
20
|
0
|
|
|
|
|
|
for (@{ $self->children }) { |
|
0
|
|
|
|
|
|
|
21
|
0
|
0
|
|
|
|
|
push @items, $_ if $_->isa('Org::Element::ListItem'); |
22
|
|
|
|
|
|
|
} |
23
|
0
|
|
|
|
|
|
\@items; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
# ABSTRACT: Represent Org list |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=pod |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=encoding UTF-8 |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 NAME |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Org::Element::List - Represent Org list |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 VERSION |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
This document describes version 0.560 of Org::Element::List (from Perl distribution Org-Parser), released on 2023-08-05. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 DESCRIPTION |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Must have L<Org::Element::ListItem> (or another ::List) as children. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Derived from L<Org::Element>. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=begin Pod::Coverage |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=end Pod::Coverage |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 indent |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Indent (e.g. " " x 2). |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head2 type |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
'U' for unordered list (-, +, * for bullets), 'D' for description list, 'O' for |
65
|
|
|
|
|
|
|
ordered list (1., 2., 3., and so on). |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 bullet_style |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
E.g. '-', '*', '+'. For ordered list, currently just use '<N>.' |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 METHODS |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 $list->items() => ARRAY OF OBJECTS |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Return the items, which are an arrayref of L<Org::Element::ListItem> objects. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 HOMEPAGE |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Please visit the project's homepage at L<https://metacpan.org/release/Org-Parser>. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 SOURCE |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Source repository is at L<https://github.com/perlancar/perl-Org-Parser>. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 AUTHOR |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
perlancar <perlancar@cpan.org> |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 CONTRIBUTING |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
To contribute, you can send patches by email/via RT, or send pull requests on |
93
|
|
|
|
|
|
|
GitHub. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Most of the time, you don't need to build the distribution yourself. You can |
96
|
|
|
|
|
|
|
simply modify the code, then test via: |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
% prove -l |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
If you want to build the distribution (e.g. to try to install it locally on your |
101
|
|
|
|
|
|
|
system), you can install L<Dist::Zilla>, |
102
|
|
|
|
|
|
|
L<Dist::Zilla::PluginBundle::Author::PERLANCAR>, |
103
|
|
|
|
|
|
|
L<Pod::Weaver::PluginBundle::Author::PERLANCAR>, and sometimes one or two other |
104
|
|
|
|
|
|
|
Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond |
105
|
|
|
|
|
|
|
that are considered a bug and can be reported to me. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
This software is copyright (c) 2023, 2022, 2021, 2020, 2019, 2017, 2016, 2015, 2014, 2013, 2012, 2011 by perlancar <perlancar@cpan.org>. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
112
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 BUGS |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Org-Parser> |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
When submitting a bug or request, please include a test-file or a |
119
|
|
|
|
|
|
|
patch to an existing test-file that illustrates the bug or desired |
120
|
|
|
|
|
|
|
feature. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=cut |