---
name: "Debian::LicenseReconcile::Filter"
section: "3pm"
platform: "linux"
package: "license-reconcile"
version: "0.16"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/Debian::LicenseReconcile::Filter"
---

# Debian::LicenseReconcile::Filter(3pm)

abstract interface to license info

## NAME

Debian::LicenseReconcile::Filter - abstract interface to license info

## VERSION

Version 0.16

## SYNOPSIS

```
    use Debian::LicenseReconcile::Filter;
    my $filter = Debian::LicenseReconcile::Filter->new(arg1=>"blah",...);
    my @info = $filter->get_info(@files);
```

## SUBROUTINES/METHODS

### new

This constructor takes key value pairs and returns the correspondingly blessed object.

### get\_info

Returns a list of hash references describing copyright and license information that should be checked against the copyright target.

### directory

Returns the search directory as set in the constructor.

### files\_remaining

Returns the files to be checked as set in the constructor.

### changelog

Returns the Parse::DebianChangelog as set in the constructor.

### config

Returns the config data as set in the constructor.

### licensecheck

Returns the Debian::LicenseReconcile::LicenseCheck object as set in the constructor.

### name

Returns the name set in the constructor.

### find\_rule

This is a helper method designed to allow derived classes implement rules based semantics. It takes a file name and an array ref to a sequence of rules. Each rule is a hash ref, which may contain the following fields:

- \- Glob (optional) - a file glob to limit which files the rule applies to.

  - \- Contains (optional) - a piece of text which the file must contain for the rule to apply.

  - \- Matches (optional) - an extended regular expression which the file contents must match for the rule to apply.

  - \- MMagic (optional) - a string which must equal the magic value obtained from File::MMagic for the rule to apply.

  - \- MaxVersion (optional) - an upstream version string after which the rule will not be applied. This is recommended unless you are certain that the rule is robust so that the rule will be regularly reviewed.

  - \- VerifyLicense (optional) - a string which must be present in the license portion of licensecheck output.

  The first rule which matches the file is returned. If no rule matches then  undef is returned.

## AUTHOR

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

## LICENSE AND COPYRIGHT

Copyright 2012, 2015, Nicholas Bamber `"<nicholas at periapt.co.uk>"`.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.
