WHAT?

Software-License-OrLaterPack (or just OrLaterPack for brevity) is an add-on for
Software-License, a set of licenses with "or later" clause (like
GPL_3::or_later). It allows Perl developers (who use Dist-Zilla) to release
their work under the terms of a *License* version *N* or (at user option) any
later version.

WHY?

Dist-Zilla is a popular tool for building CPAN distributions. Build process is
controlled by dist.ini, Dist-Zilla configuration file. A distribution author can
specify license covering his work by using license option in dist.ini file:

    license = NAME

where *NAME* is a name of module from Software::License hierarchy.

Software-License is shipped with a set of popular licenses, from Apache_1_1 to
Zlib, including GNU licenses (GPL), including their "Affero" and "Lesser"
variants.

So, if a developer wants to release his work under the terms of the GPL version
3, he should write in his dist.ini:

    license = GPL_3

However, Free Software Foundation recommends using clause "license version *N*
or (at your option) any later version". Unfortunately, Software-License
distribution does not supply (out of the box) a way to express such clause.

OrLaterPack fulfills the lack. If OrLaterPack is installed, a developer can
specify in his dist.ini:

    license = GPL_3::or_later

NAMING

perl-Software-License-OrLaterPack is official software name.

However, in Perl world prefix "perl-" is redundant and not used. For example, on
meta::cpan <https://metacpan.org/> this software is named as
Software-License-OrLaterPack. In the rest of the documentation shortened name
Software-License-OrLaterPack is used as synonym for full name
perl-Software-License-OrLaterPack. We are in the Perl world, aren't we?

You may notice that name may be spelled with dashes
(Software-License-OrLaterPack) or with double colons
(Software::License::OrLaterPack). Strictly speaking, there is difference: the
first one is software name, while the second is name of Perl package, but often
these names are interchangeable especially if software consists of single
package.

FORMS

You may face Software-License-OrLaterPack in *source* or *distribution* forms.

If you are going to use GNU license with "or later" clause, you will likely be
interested in *using* Software-License-OrLaterPack *distribution*. If you are
going to *develop* (or *hack*) the Software-License-OrLaterPack itself, you will
likely need the *source*, not distribution.

Since Perl is an interpreting language, modules in the distribution *look* like
sources. Actually, they are Perl source files. But they are not *actual*
sources, because they are *built* (preprocessed or generated) by Dist-Zilla.

How to distinguish source and distribution:

*   Source may contain Mercurial files and directories .hgignore, .hgtags, .hg/,
    while distribution should not.

*   Source should contain files dist.ini, weaver.ini, while distribution may
    not.

*   Source should *not* contain xt/ directory, while distribution should.

*   Name of source directory does *not* include version (e. g.
    Software-License-OrLaterPack), while name of distribution does (e. g.
    Software-License-OrLaterPack-0.007).

SOURCE

Software-License-OrLaterPack source is in Mercurial repository hosted on
fedorapeople.org. To clone the entire repository:

    $ hg clone https://vandebugger.fedorapeople.org/hg/perl-Software-License-OrLaterPack

Source Files

Software-License-OrLaterPack source files usually include a comment near the top
of the file:

    This file is part of perl-Software-License-OrLaterPack.

Not all source files are included into distribution. Some source files are used
at distribution build time only, and not required for installation.

DISTRIBUTION

Software-License-OrLaterPack distributions are published on CPAN
<https://metacpan.org/release/Software-License-OrLaterPack>.

Generated Files

Distribution may contain files preprocessed or generated by Dist-Zilla and its
plugins. Some generated files are made from Software-License-OrLaterPack source,
but some are generated from third-party templates. Files generated from
third-party templates usually include a comment near the top of the file:

    This file was generated with NAME

(where *NAME* is a name of the plugin generated the file). Such files are *not*
part of Software-License-OrLaterPack source, and Software-License-OrLaterPack
copyright and license are not applicable to such files.

INSTALLING

With cpanm

cpanm tool is (probably) the easiest way to install distribution. It automates
downloading, building, testing, installing, and uninstalling.

To install the latest version from CPAN:

    $ cpanm Software::License::OrLaterPack

To install a specific version (e. g. *0.007*) from CPAN:

    $ cpanm Software::License::OrLaterPack@0.007

To install locally available distribution (e. g. previously downloaded from CPAN
or built from sources):

    $ cpanm ./Software-License-OrLaterPack-0.007.tar.gz

To uninstall the distribution:

    $ cpanm -U Software::License::OrLaterPack

Manually

To install distribution tarball manually (let us assume you have version *0.007*
of the distribution):

    $ tar xaf Software-License-OrLaterPack-0.007.tar.gz
    $ cd Software-License-OrLaterPack-0.007
    $ perl Build.PL
    $ ./Build build
    $ ./Build test
    $ ./Build install

See Also

How to install CPAN modules <http://www.cpan.org/modules/INSTALL.html>

HACKING

For hacking, you will need Mercurial, Perl interpreter and Dist-Zilla (with some
plugins), and likely cpanm to install missed parts.

Clone the repository first:

    $ hg clone https://vandebugger.fedorapeople.org/hg/perl-Software-License-OrLaterPack
    $ cd perl-Software-License-OrLaterPack

To build a distribution from the source, run:

    $ dzil build

If required Dist-Zilla plugins are missed, dzil tool will warn you and show the
command to install all the required plugins, e. g.:

    Required plugin Dist::Zilla::Plugin::Test::EOL isn't installed.

    Run 'dzil authordeps' to see a list of all required plugins.
    You can pipe the list to your CPAN client to install or update them:

        dzil authordeps --missing | cpanm

To run the tests:

    $ dzil test

To run all the tests, including release tests:

    $ dzil test --release

To install the distribution:

    $ dzil install

or

    $ cpanm ./Software-License-OrLaterPack-VERSION.tar.gz

where *VERSION* is a version of built distribution.

To clean the directory:

    $ dzil clean

DOCUMENTATION

Online

The easiest way is browsing the documentation online at meta::cpan
<https://metacpan.org/release/Software-License-OrLaterPack>.

Locally Installed

If you have the distribution installed, use perldoc tool to browse locally
installed documentation:

    $ perldoc Software::License::OrLaterPack::Manual
    $ perldoc Software::License::OrLaterPack

Built from Source

Build Software-License-OrLaterPack first (see "HACKING"), then:

    $ cd Software-License-OrLaterPack-VERSION
    $ perldoc Software::License::OrLaterPack::Manual
    $ perldoc Software::License::OrLaterPack

where *VERSION* is a version of built distribution.

FEEDBACK

CPAN Request Tracker

The quickest way to report a bug in Software-License-OrLaterPack is by sending
email to bug-Software-License-OrLaterPack [at] rt.cpan.org.

CPAN request tracker can be used via web interface also:

Browse bugs
<https://rt.cpan.org/Public/Dist/Display.html?Name=Software-License-OrLaterPack>
    Browsing bugs does not require authentication.

Report bugs
<https://rt.cpan.org/Public/Bug/Report.html?Queue=Software-License-OrLaterPack>
    You need to be a CPAN author, have a BitCard <https://www.bitcard.org/>
    account, or OpenID in order to report bugs via the web interface.

    (On 2015-04-27 I have logged in successfully with my LiveJournal OpenID, but
    my Google OpenID did not work for CPAN. I did not check other OpenID
    providers.)

Send Email to Author

As a last resort, send email to author: Van de Bugger <van.de.bugger@gmail.com>.
Please start message subject with "perl-Software-License-OrLaterPack:".

GLOSSARY

CPAN
    Comprehensive Perl Archive Network, a large collection of Perl software and
    documentation. See cpan.org <http://www.cpan.org>, What is CPAN?
    <http://www.cpan.org/misc/cpan-faq.html#What_is_CPAN>.

Distribution
    Tarball, containing Perl modules and accompanying files (documentation,
    metainfo, tests). Usually distributions are uploaded to CPAN, and can be
    installed with dedicated tools (cpan, cpanm, and others).

Module
    Perl library file, usually with .pm suffix. Usually contains one package.
    See perlmod <http://perldoc.perl.org/perlmod.html#Perl-Modules>.

Package
    Perl language construct. See package
    <http://perldoc.perl.org/functions/package.html> and perlmod
    <http://perldoc.perl.org/perlmod.html#Packages>.