App-lupapona

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

      "configure" : {
         "requires" : {
            "ExtUtils::MakeMaker" : "0"
         }
      },
      "runtime" : {
         "requires" : {
            "File::MimeInfo" : "0",
            "File::Slurper" : "0",
            "IO::Socket::SSL" : "0",
            "Modern::Perl" : "1.20180701",
            "Mojolicious" : "8.12",
            "URI::Escape" : "0",
            "perl" : "5.026000",
            "strict" : "0",
            "warnings" : "0"
         }
      }
   },
   "release_status" : "stable",
   "resources" : {

META.yml  view on Meta::CPAN

  version: '1.4'
name: App-lupapona
no_index:
  directory:
    - t
    - inc
requires:
  File::MimeInfo: '0'
  File::Slurper: '0'
  IO::Socket::SSL: '0'
  Modern::Perl: '1.20180701'
  Mojolicious: '8.12'
  URI::Escape: '0'
  perl: '5.026000'
  strict: '0'
  warnings: '0'
resources:
  repository: https://alexschroeder.ch/cgit/lupa-pona
version: 1.07
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'

MYMETA.json  view on Meta::CPAN

      "configure" : {
         "requires" : {
            "ExtUtils::MakeMaker" : "0"
         }
      },
      "runtime" : {
         "requires" : {
            "File::MimeInfo" : "0",
            "File::Slurper" : "0",
            "IO::Socket::SSL" : "0",
            "Modern::Perl" : "1.20180701",
            "Mojolicious" : "8.12",
            "URI::Escape" : "0",
            "perl" : "5.026000",
            "strict" : "0",
            "warnings" : "0"
         }
      }
   },
   "release_status" : "stable",
   "resources" : {

MYMETA.yml  view on Meta::CPAN

  version: '1.4'
name: App-lupapona
no_index:
  directory:
    - t
    - inc
requires:
  File::MimeInfo: '0'
  File::Slurper: '0'
  IO::Socket::SSL: '0'
  Modern::Perl: '1.20180701'
  Mojolicious: '8.12'
  URI::Escape: '0'
  perl: '5.026000'
  strict: '0'
  warnings: '0'
resources:
  repository: https://alexschroeder.ch/cgit/lupa-pona
version: 1.07
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'

Makefile.PL  view on Meta::CPAN

use 5.008004;
use ExtUtils::MakeMaker;

WriteMakefile(
  NAME             => 'App::lupapona',
  VERSION_FROM     => 'lib/App/lupapona.pm',
  ABSTRACT_FROM    => 'lib/App/lupapona.pm',
  AUTHOR           => 'Alex Schroeder',
  LICENSE          => 'agpl_3',
  MIN_PERL_VERSION => '5.26.0', # Modern::Perl '2018'
  EXE_FILES        => [
    'script/lupa-pona',
  ],
  PREREQ_PM        => {
    'strict'   => 0,
    'warnings' => 0,
    'Mojolicious' => 8.12, # Mojo::IOLoop, also adds IO::Socket::IP
    # this is an optional dependency for Mojo::IOLoop
    'IO::Socket::SSL' => 0,
    'File::Slurper' => 0,
    'Modern::Perl' => 1.20180701, # for '2018'
    'URI::Escape' => 0,
    'File::MimeInfo' => 0,
  },
  META_MERGE => {
    'meta-spec' => { version => 2 },
    resources => {
      repository => {
	type => 'git',
	url  => 'https://alexschroeder.ch/cgit/lupa-pona',
	web  => 'https://alexschroeder.ch/cgit/lupa-pona/about/',

README.md  view on Meta::CPAN


Currently, all files are served as `text/gemini; charset=UTF-8`.

## Dependencies

Perl libraries you need to install if you want to run Lupa Pona:

- [Mojo::Log](https://metacpan.org/pod/Mojo%3A%3ALog) and [Mojo::IOLoop](https://metacpan.org/pod/Mojo%3A%3AIOLoop), or `libmojolicious-perl`
- [IO::Socket::SSL](https://metacpan.org/pod/IO%3A%3ASocket%3A%3ASSL), or `libio-socket-ssl-perl`
- [File::Slurper](https://metacpan.org/pod/File%3A%3ASlurper), or `libfile-slurper-perl`
- [Modern::Perl](https://metacpan.org/pod/Modern%3A%3APerl), or `libmodern-perl-perl`
- [URI::Escape](https://metacpan.org/pod/URI%3A%3AEscape), or `liburi-escape-xs-perl`

## Quickstart

Since Lupa Pona traffic is encrypted, we need to generate a certificate and a
key. When you start it for the first time, it will ask you for a hostname. Use
'localhost' if you don't know. You can also generate your own certificate, like
this, replacing `$hostname` with whatever you need:

    openssl req -new -x509 -newkey ec -subj "/CN=$hostname" \

script/lupa-pona  view on Meta::CPAN

Perl libraries you need to install if you want to run Lupa Pona:

=over

=item L<Mojo::Log> and L<Mojo::IOLoop>, or C<libmojolicious-perl>

=item L<IO::Socket::SSL>, or C<libio-socket-ssl-perl>

=item L<File::Slurper>, or C<libfile-slurper-perl>

=item L<Modern::Perl>, or C<libmodern-perl-perl>

=item L<URI::Escape>, or C<liburi-escape-xs-perl>

=back

=head2 Quickstart

Since Lupa Pona traffic is encrypted, we need to generate a certificate and a
key. When you start it for the first time, it will ask you for a hostname. Use
'localhost' if you don't know. You can also generate your own certificate, like

script/lupa-pona  view on Meta::CPAN

comply with the
L<GDPR|https://en.wikipedia.org/wiki/General_Data_Protection_Regulation>.

=cut

use Mojo::Log;
use Mojo::IOLoop;
use Getopt::Long;
use File::Slurper qw(read_binary read_dir);
use Encode qw(encode_utf8 decode_utf8);
use Modern::Perl '2018';
use File::MimeInfo qw(globs);
use URI::Escape;
use Pod::Text;
use utf8;

our $host;
our $port ||= 1965;
our $cert_file ||= "cert.pem";
our $key_file ||= "key.pem";
our $encoding ||= "UTF-8";

t/basic.t  view on Meta::CPAN

# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.

use Modern::Perl;
use Mojo::IOLoop;
use IO::Socket::SSL;
use Test::More;
use File::Slurper qw(write_text);
use Config;

my $host = 'localhost';
my $port = Mojo::IOLoop::Server->generate_port;

my $pid = fork();



( run in 0.449 second using v1.01-cache-2.11-cpan-4d50c553e7e )