File Coverage

blib/lib/Org/Element/Footnote.pm
Criterion Covered Total %
statement 13 16 81.2
branch 0 2 0.0
condition 0 2 0.0
subroutine 5 7 71.4
pod 2 3 66.6
total 20 30 66.6


line stmt bran cond sub pod time code
1              
2             use 5.010;
3 3     3   1235 use locale;
  3         9  
4 3     3   16 use Log::ger;
  3         5  
  3         16  
5 3     3   93 use Moo;
  3         5  
  3         22  
6 3     3   556 extends 'Org::Element';
  3         5  
  3         16  
7             with 'Org::ElementRole';
8             with 'Org::ElementRole::Inline';
9              
10             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
11             our $DATE = '2022-06-23'; # DATE
12             our $DIST = 'Org-Parser'; # DIST
13             our $VERSION = '0.558'; # VERSION
14              
15             has name => (is => 'rw');
16             has is_ref => (is => 'rw');
17             has def => (is => 'rw');
18              
19             my ($self, $args) = @_;
20             log_trace("name = %s", $self->name);
21 5     5 0 1412 }
22 5         12  
23             my ($self) = @_;
24              
25             join("",
26 0     0 1   "[fn:", ($self->name // ""),
27             defined($self->def) ? ":".$self->def->as_string : "",
28 0 0 0       "]");
29             }
30              
31             goto \&as_string;
32             }
33              
34             1;
35 0     0 1   # ABSTRACT: Represent Org footnote reference and/or definition
36              
37              
38             =pod
39              
40             =encoding UTF-8
41              
42             =head1 NAME
43              
44             Org::Element::Footnote - Represent Org footnote reference and/or definition
45              
46             =head1 VERSION
47              
48             This document describes version 0.558 of Org::Element::Footnote (from Perl distribution Org-Parser), released on 2022-06-23.
49              
50             =head1 DESCRIPTION
51              
52             Derived from L<Org::Element>.
53              
54             =for Pod::Coverage ^(BUILD)$
55              
56             =head1 ATTRIBUTES
57              
58             =head2 name => STR|undef
59              
60             Can be undef, for anonymous footnote (but in case of undef, is_ref must be
61             true and def must also be set).
62              
63             =head2 is_ref => BOOL
64              
65             Set to true to make this a footnote reference.
66              
67             =head2 def => TEXT ELEMENT
68              
69             Set to make this a footnote definition.
70              
71             =head1 METHODS
72              
73             =head2 as_string => str
74              
75             From L<Org::Element>.
76              
77             =head2 as_text => str
78              
79             From L<Org::ElementRole::Inline>.
80              
81             =head1 HOMEPAGE
82              
83             Please visit the project's homepage at L<https://metacpan.org/release/Org-Parser>.
84              
85             =head1 SOURCE
86              
87             Source repository is at L<https://github.com/perlancar/perl-Org-Parser>.
88              
89             =head1 AUTHOR
90              
91             perlancar <perlancar@cpan.org>
92              
93             =head1 CONTRIBUTING
94              
95              
96             To contribute, you can send patches by email/via RT, or send pull requests on
97             GitHub.
98              
99             Most of the time, you don't need to build the distribution yourself. You can
100             simply modify the code, then test via:
101              
102             % prove -l
103              
104             If you want to build the distribution (e.g. to try to install it locally on your
105             system), you can install L<Dist::Zilla>,
106             L<Dist::Zilla::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
107             Dist::Zilla plugin and/or Pod::Weaver::Plugin. Any additional steps required
108             beyond that are considered a bug and can be reported to me.
109              
110             =head1 COPYRIGHT AND LICENSE
111              
112             This software is copyright (c) 2022, 2021, 2020, 2019, 2017, 2016, 2015, 2014, 2013, 2012, 2011 by perlancar <perlancar@cpan.org>.
113              
114             This is free software; you can redistribute it and/or modify it under
115             the same terms as the Perl 5 programming language system itself.
116              
117             =head1 BUGS
118              
119             Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Org-Parser>
120              
121             When submitting a bug or request, please include a test-file or a
122             patch to an existing test-file that illustrates the bug or desired
123             feature.
124              
125             =cut