Debian::LicenseReconcile::LicenseCheck(3pm)

Debian::LicenseReconcile::LicenseCheck3pm

Wrapper around licensecheck

Usage

    use Debian::LicenseReconcile::LicenseCheck;
    my $filter = Debian::LicenseReconcile::LicenseCheck->new(directory=>'.');
    my @info = $filter->get_info();

Version

Version 0.16

Overview

This module is designed to provide an interface to the licensecheck program suitable for use in Debian::LicenseReconcile::Filter objects.

Subroutines/methods

new

The constructor takes the base directory as an argument. Any other arguments are interpreted as key/value pairs mapping the license statements generated by licensecheck onto those used in "debian/copyright".

get_info

Returns a list of hash references describing copyright and license information that should be checked against the copyright target. If no additional argument is passed, the results returned from this filter are those that are obtained from "licensecheck --no-conf --recursive --copyright DIR". The optional file argument must be relative to the directory given to the constructor. If the file is a directory then the "--recursive" option is used.

Optionally this method may take an additional regular expression format string argument. If present this regular expression will be used to extract copyright data from the file contents in preference to what licensecheck returns. If the regular expression fails to match, licensecheck data will be used instead. The regular expression should have a capture for each line. A capture may span lines and the regular expression will be enclosed in "m{...}xms".

raw_license

Given a file this method returns the license data produced from "licensecheck --no-conf FILE".

Releases

3 releases since Debian 8 (Jessie); the text changed 2 times.

  1. 8
  2. 9
  3. 10

Author

Nicholas Bamber, "<nicholas at periapt.co.uk>"

From license-reconcile 0.16 in Debian 10 (Buster). Parsed by carta from the page's man source.