File Coverage

blib/lib/Org/Element/RadioTarget.pm
Criterion Covered Total %
statement 14 17 82.3
branch 2 2 100.0
condition 1 2 50.0
subroutine 4 6 66.6
pod 2 3 66.6
total 23 30 76.6


line stmt bran cond sub pod time code
1             package Org::Element::RadioTarget;
2              
3 3     3   1092 use 5.010;
  3         11  
4 3     3   15 use locale;
  3         7  
  3         14  
5 3     3   89 use Moo;
  3         5  
  3         14  
6             extends 'Org::Element';
7             with 'Org::ElementRole';
8             with 'Org::ElementRole::Inline';
9              
10             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
11             our $DATE = '2023-07-12'; # DATE
12             our $DIST = 'Org-Parser'; # DIST
13             our $VERSION = '0.559'; # VERSION
14              
15             has target => (is => 'rw');
16              
17             sub BUILD {
18 4     4 0 1556 my ($self, $args) = @_;
19 4   50     12 my $pass = $args->{pass} // 1;
20 4         11 my $doc = $self->document;
21 4 100       17 if ($pass == 1) {
22 2         2 push @{ $doc->radio_targets },
  2         15  
23             $self->target;
24             }
25             }
26              
27             sub as_string {
28 0     0 1   my ($self) = @_;
29 0           join("",
30             "<<<", $self->target, ">>>");
31             }
32              
33             sub as_text {
34 0     0 1   goto \&as_string;
35             }
36              
37             1;
38             # ABSTRACT: Represent Org radio target
39              
40             __END__
41              
42             =pod
43              
44             =encoding UTF-8
45              
46             =head1 NAME
47              
48             Org::Element::RadioTarget - Represent Org radio target
49              
50             =head1 VERSION
51              
52             This document describes version 0.559 of Org::Element::RadioTarget (from Perl distribution Org-Parser), released on 2023-07-12.
53              
54             =head1 DESCRIPTION
55              
56             Derived from L<Org::Element>.
57              
58             =for Pod::Coverage ^(BUILD)$
59              
60             =head1 ATTRIBUTES
61              
62             =head2 target
63              
64             =head1 METHODS
65              
66             =head2 as_string => str
67              
68             From L<Org::Element>.
69              
70             =head2 as_text => str
71              
72             From L<Org::ElementRole::Inline>.
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>,
100             L<Pod::Weaver::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
101             Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond
102             that are considered a bug and can be reported to me.
103              
104             =head1 COPYRIGHT AND LICENSE
105              
106             This software is copyright (c) 2023, 2022, 2021, 2020, 2019, 2017, 2016, 2015, 2014, 2013, 2012, 2011 by perlancar <perlancar@cpan.org>.
107              
108             This is free software; you can redistribute it and/or modify it under
109             the same terms as the Perl 5 programming language system itself.
110              
111             =head1 BUGS
112              
113             Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Org-Parser>
114              
115             When submitting a bug or request, please include a test-file or a
116             patch to an existing test-file that illustrates the bug or desired
117             feature.
118              
119             =cut