File Coverage

blib/lib/App/Spoor/TransmitterUnitFile.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 15 15 100.0


line stmt bran cond sub pod time code
1             package App::Spoor::TransmitterUnitFile;
2              
3 1     1   11 use v5.10;
  1         3  
4 1     1   5 use strict;
  1         3  
  1         38  
5 1     1   5 use warnings;
  1         2  
  1         98  
6              
7             =head1 NAME
8              
9             App::Spoor::TransmitterUnitFile
10              
11             =head1 VERSION
12              
13             Version 0.01
14              
15             =cut
16              
17             our $VERSION = '0.01';
18              
19             =head1 SYNOPSIS
20              
21             This package exists purely as a means of delivering the contents of the systemd unit file for the service that submits
22             data to the Spoor API.
23              
24             =head1 SUBROUTINES
25              
26             =head2 contents
27              
28             Returns the contents of the systemd unit file for the service responsible for submitting data to the Spoor API.
29              
30             =cut
31              
32             sub contents {
33 9     9 1 592 my $contents = <<'END_MESSAGE';
34             [Unit]
35             Description=Spoor Transmitter Service
36              
37             [Service]
38             StartLimitInterval=0
39             Type=simple
40             Restart=always
41             RestartSec=1
42             User=root
43             ExecStart=/usr/local/bin/spoor_entry_transmitter
44              
45             [Install]
46             WantedBy=multi-user.target
47             END_MESSAGE
48              
49 9         49 return $contents;
50             }
51              
52             =head1 AUTHOR
53              
54             Rory McKinley, C<< <rorymckinley at capefox.co> >>
55              
56             =head1 BUGS
57              
58             Please report any bugs or feature requests to C<bug-. at rt.cpan.org>, or through
59             the web interface at L<https://rt.cpan.org/NoAuth/ReportBug.html?Queue=.>. I will be notified, and then you'll
60             automatically be notified of progress on your bug as I make changes.
61              
62              
63             =head1 SUPPORT
64              
65             You can find documentation for this module with the perldoc command.
66              
67             perldoc App::Spoor::TransmitterUnitFile
68              
69              
70             You can also look for information at:
71              
72             =over 4
73              
74             =item * RT: CPAN's request tracker (report bugs here)
75              
76             L<https://rt.cpan.org/NoAuth/Bugs.html?Dist=.>
77              
78             =item * AnnoCPAN: Annotated CPAN documentation
79              
80             L<http://annocpan.org/dist/.>
81              
82             =item * CPAN Ratings
83              
84             L<https://cpanratings.perl.org/d/.>
85              
86             =item * Search CPAN
87              
88             L<https://metacpan.org/release/.>
89              
90             =back
91              
92             =head1 LICENSE AND COPYRIGHT
93              
94             Copyright 2019 Rory McKinley.
95              
96             This program is free software; you can redistribute it and/or modify it
97             under the terms of the the Artistic License (2.0). You may obtain a
98             copy of the full license at:
99              
100             L<http://www.perlfoundation.org/artistic_license_2_0>
101              
102             Any use, modification, and distribution of the Standard or Modified
103             Versions is governed by this Artistic License. By using, modifying or
104             distributing the Package, you accept this license. Do not use, modify,
105             or distribute the Package, if you do not accept this license.
106              
107             If your Modified Version has been derived from a Modified Version made
108             by someone other than you, you are nevertheless required to ensure that
109             your Modified Version complies with the requirements of this license.
110              
111             This license does not grant you the right to use any trademark, service
112             mark, tradename, or logo of the Copyright Holder.
113              
114             This license includes the non-exclusive, worldwide, free-of-charge
115             patent license to make, have made, use, offer to sell, sell, import and
116             otherwise transfer the Package with respect to any patent claims
117             licensable by the Copyright Holder that are necessarily infringed by the
118             Package. If you institute patent litigation (including a cross-claim or
119             counterclaim) against any party alleging that the Package constitutes
120             direct or contributory patent infringement, then this Artistic License
121             to you shall terminate on the date that such litigation is filed.
122              
123             Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
124             AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
125             THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
126             PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY
127             YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
128             CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
129             CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
130             EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
131              
132              
133             =cut
134              
135             1; # End of App::Spoor::TransmitterUnitFile