File Coverage

blib/lib/PGXN/Site.pm
Criterion Covered Total %
statement 5 6 83.3
branch n/a
condition n/a
subroutine 2 3 66.6
pod 1 1 100.0
total 8 10 80.0


line stmt bran cond sub pod time code
1             package PGXN::Site;
2              
3 2     2   154181 use 5.10.0;
  2         22  
4 2     2   736 use utf8;
  2         18  
  2         13  
5             our $VERSION = v0.22.1;
6              
7             sub version_string {
8 0     0 1   sprintf 'v%vd', $VERSION;
9             }
10              
11             1;
12              
13             =head1 Name
14              
15             PGXN::Site - Maintain and serve a PGXN web site
16              
17             =head1 Synopsis
18              
19             pgxn_site_server --api-url https://api.pgxn.org/ \
20             --errors-from oops@example.com \
21             --errors-to alerts@example.com \
22             --feedback-to feedback@example.com
23              
24             =head1 Description
25              
26             L is a L-inspired network for
27             distributing extensions for the L.
28             All of the infrastructure tools, however, have been designed to be used to
29             create networks for distributing any kind of release distributions and for
30             providing a lightweight static file JSON REST API.
31              
32             This module provides a simple PGXN web site. All it needs is a
33             L-powered API to get the data it needs. Such an API can be accessed
34             either remotely or via the local file system.
35              
36             To run your own PGXN web server, just install this module and run the included
37             L< L server, passing it the following options:
38              
39             =over
40              
41             =item C
42              
43             The URL to use to access the L server. Required.
44              
45             =item C
46              
47             A private URL to use to access the L-powered API. Optional. Useful
48             if you're serving the site and the API from the same box (or with access to
49             the same file system) and want it to be fast: just specify a C URL here
50             and the API will be read directly from the file system. The C option
51             will still be used for public URLs pointing to the API in the UI.
52              
53             =item C
54              
55             If you need to access C via a proxy server, provide the URL for that
56             proxy server in this option.
57              
58             =item C
59              
60             An email address to which error emails should be sent. In the event of an
61             internal server error, the server will send an email to this address with
62             diagnostic information.
63              
64             =item C
65              
66             An email address from which alert emails should be sent.
67              
68             =item C
69              
70             An email address to which feedback emails should be sent. This email address
71             will be provided as a clickable link.
72              
73             =back
74              
75             =head1 Interface
76              
77             The PGXN::Site class itself consists of a single class method.
78              
79             =head2 Class Method
80              
81             =head3 C
82              
83             say 'PGXN::Site ', PGXN::Site->version_string;
84              
85             Returns a string representation of the PGXN::Site version.
86              
87             =head1 Author
88              
89             David E. Wheeler
90              
91             =head1 Copyright and License
92              
93             Copyright (c) 2010-2021 David E. Wheeler.
94              
95             This module is free software; you can redistribute it and/or modify it under
96             the L.
97              
98             Permission to use, copy, modify, and distribute this software and its
99             documentation for any purpose, without fee, and without a written agreement is
100             hereby granted, provided that the above copyright notice and this paragraph
101             and the following two paragraphs appear in all copies.
102              
103             In no event shall David E. Wheeler be liable to any party for direct,
104             indirect, special, incidental, or consequential damages, including lost
105             profits, arising out of the use of this software and its documentation, even
106             if David E. Wheeler has been advised of the possibility of such damage.
107              
108             David E. Wheeler specifically disclaims any warranties, including, but not
109             limited to, the implied warranties of merchantability and fitness for a
110             particular purpose. The software provided hereunder is on an "as is" basis,
111             and David E. Wheeler has no obligations to provide maintenance, support,
112             updates, enhancements, or modifications.
113              
114             =cut
115