Element/FixedWidthSection.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 25 / 25 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Element/Comment.pm ↑ Summary Element/TableCell.pm »
1 package Org::Element::FixedWidthSection;
2  
3 5 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use locale;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 extends 'Org::Element';
7 5 with 'Org::ElementRole';
8 5 with 'Org::ElementRole::Block';
9  
10 5 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
11 5 our $DATE = '2023-11-06'; # DATE
12 5 our $DIST = 'Org-Parser'; # DIST
13 5 our $VERSION = '0.561'; # VERSION
14  
15 sub text {
16 3 ▶ my ($self) = @_;
Subroutine text: called CC=1 SCAR=0.0
Pod documented
17 3 my $res = $self->_str;
18 3 $res =~ s/^[ \t]*: ?//mg;
19 3 $res;
20 }
21  
22 5 1;
23 # ABSTRACT: Represent Org fixed-width section
24  
25 __END__
26  
27 =pod
28  
29 =encoding UTF-8
30  
31 =head1 NAME
32  
33 Org::Element::FixedWidthSection - Represent Org fixed-width section
34  
35 =head1 VERSION
36  
37 This document describes version 0.561 of Org::Element::FixedWidthSection (from Perl distribution Org-Parser), released on 2023-11-06.
38  
39 =head1 SYNOPSIS
40  
41 use Org::Element::FixedWidthSection;
42 my $el = Org::Element::FixedWidthSection->new(_str => ": line1\n: line2\n");
43  
44 =head1 DESCRIPTION
45  
46 Fixed width section is a block of text where each line is prefixed by colon +
47 space (or just a colon + space or a colon). Example:
48  
49 Here is an example:
50 : some example from a text file.
51 : second line.
52 :
53 : fourth line, after the empty above.
54  
55 which is functionally equivalent to:
56  
57 Here is an example:
58 #+BEGIN_EXAMPLE
59 some example from a text file.
60 another example.
61  
62 fourth line, after the empty above.
63 #+END_EXAMPLE
64  
65 Derived from L<Org::Element>.
66  
67 =head1 ATTRIBUTES
68  
69 =head1 METHODS
70  
71 =head2 $el->text => STR
72  
73 The text (without colon prefix).
74  
75 =for Pod::Coverage as_string BUILD
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/Comment.pm ↑ Summary Element/TableCell.pm »