openresty / test-nginx

Data-driven test scaffold for Nginx C module and OpenResty Lua library development
http://search.cpan.org/dist/Test-Nginx
438 stars 105 forks source link

How to install and how to get cpan? #158

Open Danrancan opened 1 year ago

Danrancan commented 1 year ago

The installation instructions for this are quite limited and lack description. I want to use this module to test my nginx installation, but have no idea how to install this. The install instructions just assume that you have cpan installed (let alone know what cpan is). When i do a sudo apt search cpan in ubuntu, I get the following:

cpan-listchanges/focal,focal 0.08-1 all
  package change history notification tool

cpanminus/focal,focal 1.7044-1 all
  script to get, unpack, build and install modules from CPAN

cpanoutdated/focal,focal 0.32-1 all
  script to detect outdated CPAN modules in your environment

cpants-lint/focal,focal 0.05-5 all
  commandline frontend to Module::CPANTS::Analyse - tool

libapp-cpants-lint-perl/focal,focal 0.05-5 all
  commandline frontend to Module::CPANTS::Analyse - library

libarchive-any-lite-perl/focal,focal 0.11-1 all
  simple CPAN package extractor

libbsd-arc4random-perl/focal 1.50-6build7 arm64
  CPAN's BSD::arc4random -- Perl bindings for arc4random

libcpan-audit-perl/focal,focal 0.15-2 all
  module to audit CPAN distributions for known vulnerabilities

libcpan-changes-perl/focal,focal 0.400002-1 all
  module for reading and writing CPAN Changes files

libcpan-checksums-perl/focal,focal 2.12-1 all
  Perl module to write a CHECKSUMS file for a directory as on CPAN

libcpan-common-index-perl/focal,focal 0.010-1 all
  common library for searching CPAN modules, authors, and distributions

libcpan-distnameinfo-perl/focal,focal 0.12-2 all
  module to extract distribution name and version from a filename

libcpan-inject-perl/focal,focal 1.14-1 all
  module for injecting distributions into CPAN sources

libcpan-meta-check-perl/focal,focal 0.014-1 all
  verify requirements in a CPAN::Meta object

libcpan-meta-requirements-perl/focal,focal 2.140-1 all
  set of version requirements for a CPAN dist

libcpan-meta-yaml-perl/focal,focal 0.018-1 all
  reimplementation of a subset of YAML for CPAN Meta files

libcpan-mini-inject-perl/focal,focal 0.35-1 all
  module to inject modules into a CPAN::Mini mirror

libcpan-mini-perl/focal,focal 1.111016-1 all
  module for creating a minimal mirror of CPAN

libcpan-perl-releases-perl/focal,focal 5.20200220-1 all
  module for mapping Perl releases on CPAN to the location of the tarballs

libcpan-reporter-perl/focal,focal 1.2018-1 all
  module which adds CPAN Testers reporting to CPAN.pm

libcpan-reporter-smoker-perl/focal,focal 0.29-1 all
  turnkey CPAN Testers smoking module

libcpan-sqlite-perl/focal,focal 0.217-1 all
  module to maintain a minimal CPAN database with SQLite

libcpan-uploader-perl/focal,focal 0.103013-1 all
  module to upload packages to the CPAN

libcpandb-perl/focal,focal 0.18-2 all
  Perl module for working with the unified CPAN database

libcpanel-json-xs-perl/focal 4.19-1build1 arm64
  module for fast and correct serialising to JSON

libcpanplus-dist-build-perl/focal,focal 0.90-1 all
  CPANPLUS plugin to install packages that use Build.PL

libcpanplus-perl/focal,focal 0.9906-1 all
  API & CLI access to the CPAN mirrors

libdist-inkt-role-release-perl/focal,focal 0.004-2 all
  automatically upload a distribution to the CPAN

libextutils-autoinstall-perl/focal,focal 0.64-1 all
  module to automatically install dependencies via CPAN

libextutils-makemaker-cpanfile-perl/focal,focal 0.09-1 all
  Perl module adding cpanfile support to ExtUtils-MakeMaker

libmenlo-perl/focal,focal 1.9019-1 all
  CPAN client backend

libmetacpan-client-perl/focal,focal 2.026000-1 all
  MetaCPAN API client

libmodule-cpanfile-perl/focal,focal 1.1004-1 all
  format for describing CPAN dependencies of Perl applications

libmodule-cpants-analyse-perl/focal,focal 1.01-1 all
  Perl module to generate Kwalitee ratings for a distribution

libmodule-faker-perl/focal,focal 0.022-1 all
  module to build fake dists for testing CPAN tools

libmodule-signature-perl/focal,focal 0.83-1 all
  module to manipulate CPAN SIGNATURE files

libpackage-locator-perl/focal,focal 0.10-2 all
  module to find a package among CPAN-like repositories

libparse-cpan-packages-perl/focal,focal 2.40-1 all
  module to parse the CPAN Packages file

libpod-projectdocs-perl/focal,focal 0.52-1 all
  module to generate CPAN like project documents from POD

libtest-cpan-meta-json-perl/focal,focal 0.16-1 all
  module to validate CPAN META.json files

libtest-cpan-meta-perl/focal,focal 0.25-1 all
  test module to validate package metadata for CPAN

libtest-cpan-meta-yaml-perl/focal,focal 0.25-1 all
  test module to validate a META.yml file

libtest-distmanifest-perl/focal,focal 1.014-2 all
  Perl module for verifying CPAN MANIFEST files

libtest-reporter-perl/focal,focal 1.62-1 all
  Perl module to send test results to cpan-testers@perl.org

pmuninstall/focal,focal 0.30-3 all
  script to uninstall modules installed from CPAN

secpanel/focal,focal 1:0.6.1-3 all
  graphical user interface for SSH and SCP

What exactly must I install here to get cpan, and after I get cpan, how exactly do I install this to test my nginx configurations and modules?

Please elaborate and explain with details if you can. Maybe we can get some detailed install instructions from this post?

Thanks

xpbsm commented 1 year ago

https://github.com/openresty/test-nginx#installation There are various installation options here.

 perl Makefile.PL
make
sudo make install 

This worked for me, or you could try docker-openresty(https://github.com/openresty/docker-openresty)