File Coverage

blib/lib/Org/Element/List.pm
Criterion Covered Total %
statement 8 14 57.1
branch 0 2 0.0
condition n/a
subroutine 3 4 75.0
pod 1 1 100.0
total 12 21 57.1


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