Element/List.pm

filter: Statementstmt 73.9% 17 / 23 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 70.0% 21 / 30 CC 3 SCAR 18.7
CC
3
Cov
68%
items
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 6.5
« Element/Headline.pm ↑ Summary Element/Table.pm »
1 package Org::Element::List;
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-11-06'; # DATE
10 7 our $DIST = 'Org-Parser'; # DIST
11 7 our $VERSION = '0.561'; # VERSION
12  
13 7 has indent => (is => 'rw');
14 7 has type => (is => 'rw');
15 7 has bullet_style => (is => 'rw');
16  
17 sub items {
18 0 ▶ my $self = shift;
Subroutine items: not called CC=3 SCAR=24.8
Pod documented
19 0 my @items;
20 0 for (@{ $self->children }) {
21 0 ▶ push @items, $_ if $_->isa('Org::Element::ListItem');
Branch: 1 branch
BranchTrueFalseTotal
if $_->isa("Org::Element::ListItem") 0 0 0
22 }
23 0 \@items;
24 }
25  
26 7 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.561 of Org::Element::List (from Perl distribution Org-Parser), released on 2023-11-06.
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
« Element/Headline.pm ↑ Summary Element/Table.pm »