Perldoc Browser
Perldoc Browser requires at least Perl v5.20.0 and may have other requirements if you enable a search backend. Perl dependencies are listed in cpanfile. To install them, use cpanm:
cpanm --installdeps . # no search dependencies
cpanm --installdeps --with-feature=install . # for install command
cpanm --installdeps --with-feature=pg .
cpanm --installdeps --with-feature=es .
cpanm --installdeps --with-feature=sqlite .
cpanm --installdeps --with-all-features .
Perldoc Browser is configured by perldoc-browser.conf in the application directory. The configuration file is a Perl hash. The hypnotoad
key will be used to configure Hypnotoad if it is used to start the web application.
The search backend can be set using the search_backend
key. Recognized values are pg
, es
, sqlite
, and none
(default: disables the search and indexing).
The pg
backend requires Mojo::Pg and a PostgreSQL server running at least version 9.6. The pg
configuration key must be set to a database connection URL in the form postgresql://user:password@host:port/database
.
The es
backend requires Search::Elasticsearch and an Elasticsearch server running at least version 6.0. The es
configuration key may be set to the URL to connect to the server (defaults to http://localhost:9200
).
The sqlite
backend requires Mojo::SQLite. The database is stored in the application home directory as perldoc-browser.sqlite by default. This may be configured by setting the sqlite
configuration key to a file path, which must be an absolute path to a writable directory.
Perldoc Browser renders documentation from any Perls it finds installed in the configured perls_dir
, which defaults to perls in the application directory. If no Perls are found here, it will display documentation for the Perl interpreter currently in use. The install
command can be used to use Perl::Build to install one or more Perls to this directory.
./perldoc-browser.pl install 5.10.1 5.28.0
Once a search backend is enabled, Perls must be indexed in this backend for contents of documents and document/function/variable names to be available to the search. The index
command will index or reindex the contents and names of one or more Perls.
./perldoc-browser.pl index 5.10.1 5.28.0
./perldoc-browser.pl index all # reindexes all Perls found in perls_dir
Dan Book <dbook@cpan.org>
PerldocBrowser::Plugin::PerldocRenderer is a fork of the Mojolicious team's PODRenderer plugin and its associated template.
This software is Copyright (c) 2018 by Dan Book <dbook@cpan.org>.
PerldocBrowser::Plugin::PerldocRenderer is Copyright (c) 2008-2018 Sebastian Riedel and others, 2018 Dan Book <dbook@cpan.org>.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
Bundled Perl 5 Raptor is Copyright (c) 2012, Sebastian Riedel, licensed under the CC-SA License, Version 4.0 http://creativecommons.org/licenses/by-sa/4.0.
Bundled highlight.pack.js is Copyright (c) 2006 by Ivan Sagalaev, licensed under the (three-clause) BSD License https://opensource.org/licenses/BSD-3-Clause.