File Coverage

blib/lib/PGXN/Site.pm
Criterion Covered Total %
statement 11 12 91.6
branch n/a
condition n/a
subroutine 4 5 80.0
pod 1 1 100.0
total 16 18 88.8


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