File Coverage

blib/lib/Org/Element/FixedWidthSection.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 17 17 100.0


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