Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation on Perl packages. #1790

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/maintainer/knowledge_base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ Perl packages

Perl has three standard install locations: **core**, **vendor**, and **site**. Here, **core** is used only for the perl itself, **vendor** is used for installing any other conda-forge packages, and **site** is used for the user to install things locally from sources other than conda-forge.

The most commonly used build system for `perl packages <https://github.com/conda-forge/perl-file-which-feedstock>`__ is ``ExtUtils::MakeMaker``. For typical packaging of packages of this form, you can have a look at `perl-file-which recipe <https://github.com/conda-forge/perl-file-which-feedstock/blob/main/recipe/meta.yaml>`__.
The most commonly used build system for `Perl packages <https://github.com/conda-forge/perl-file-which-feedstock>`__ is ``ExtUtils::MakeMaker``. For typical packaging of packages of this form, you can have a look at the `perl-file-which recipe <https://github.com/conda-forge/perl-file-which-feedstock/blob/main/recipe/meta.yaml>`__.

A few things to note in the `perl-file-which recipe <https://github.com/conda-forge/perl-file-which-feedstock/blob/main/recipe/meta.yaml>`__ are:

Expand All @@ -1549,7 +1549,7 @@ A few things to note in the `perl-file-which recipe <https://github.com/conda-fo
run:
- perl

* The test section contains ``imports``, which lists the CPAN module that can be used in perl.
* The test section contains ``imports``, which lists the CPAN module that can be used in Perl.

.. code-block::

Expand All @@ -1571,8 +1571,12 @@ The build section in the ``meta.yaml`` file should be something like this:
- make test
- make install VERBINST=1

Notable here is ``INSTALLDIRS=vendor``, which selects the appropriate install location for a conda-forge package, and the ``NO_PERLLOCAL`` and ``NO_PACKLIST`` switches, which suppress various CPAN tracking files that are unnecessary when the module is being externally packaged via conda.
Notable here is ``INSTALLDIRS=vendor``, which selects the appropriate install location for a conda-forge package, and the ``NO_PERLLOCAL`` and ``NO_PACKLIST`` switches, which suppress various CPAN tracking files (as described in the `ExtUtils::MakeMaker documentation <https://perldoc.perl.org/ExtUtils::MakeMaker>`__) that are unnecessary when the module is being externally packaged via conda.

.. note::

``noarch: generic`` should be used only if the package is a pure Perl package.

The other build system used for Perl packages is ``Module::Build``. ``Module::Build`` is a system for building, testing, and installing Perl modules.
It is an alternative to ``ExtUtils::MakeMaker``. It does not require a ``make`` on your system - most of the ``Module::Build`` code is pure-perl and written in a very cross-platform way.
ssurbhi560 marked this conversation as resolved.
Show resolved Hide resolved
To know more about ``Module::Build`` and difference between the two build systems read `Comparision <https://metacpan.org/pod/Module::Build#COMPARISON>`__ and `Module::Build <https://metacpan.org/pod/Module::Build>`__.
ssurbhi560 marked this conversation as resolved.
Show resolved Hide resolved