This file is indexed.

/usr/share/perl5/Debian/LicenseReconcile.pm is in license-reconcile 0.9.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
package Debian::LicenseReconcile;

use 5.006;
use strict;
use warnings;
use Debian::LicenseReconcile::Errors;

sub new {
    my $class = shift;
    my $patterns = shift;
    my $self = $patterns;
    bless $self, $class;
    return $self;
}

sub check {
    my $self = shift;
    my $subject = shift;
    my $target = shift;
    my $copyright = shift;
    my $pattern = $target->{pattern};
    my $license = $subject->{license};

    if ($subject->{license}) {
        my $target_license = $self->{$pattern}->{license};
        if ($subject->{license} ne $target_license) {
            my $msg = "File $subject->{file} has license $subject->{license} which does not match $target_license.";
            Debian::LicenseReconcile::Errors->push(
                test => 'License mismatch',
                msg => $msg,
            );
        }
    }
    if ($subject->{copyright} and $copyright) {
        my $target_copyright = $self->{$pattern}->{copyright};
        my $msg = "";
        if (not $target_copyright->contains($subject->{copyright}, \$msg)) {
            Debian::LicenseReconcile::Errors->push(
                test => 'Copyright mismatch',
                msg => "File $subject->{file}: $msg",
            );
        }
    }
    return;
}

=head1 NAME

Debian::LicenseReconcile - compare actual and required copyright and license

=head1 VERSION

Version 0.9

=cut

our $VERSION = '0.9';


=head1 SYNOPSIS

    use Debian::LicenseReconcile;

    my $reconcile = Debian::LicenseReconcile->new();
    $reconcile->check($actual, $required);

=head1 SUBROUTINES/METHODS

=head2 new

A constructor with no flexibility needed.

=head2 check

This method takes two arguments, firstly a hash obtained from the source code
under inspection and the second from the copyright file. Currently only
the C<license> field is checked. This field from the first hash must exactly
match the first line of the license field from the second.

=head1 AUTHOR

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

=head1 LICENSE AND COPYRIGHT

Copyright 2012, 2015 Nicholas Bamber C<< <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.


=cut

1; # End of Debian::LicenseReconcile