NAME

App::Licensecheck - functions for a simple license checker for source files

VERSION

Version v3.3.9

SYNOPSIS

use Path::Tiny;
use App::Licensecheck;

my $tempfile = Path::Tiny->tempfile;

$tempfile->spew(<<EOF);
# Dummy file simply stating some copyright and license.
# Copyright (C) 2020, 2022  Foo Bar.
#
# This file is licensed under version 2 or later of the GPL.
EOF

my $app = App::Licensecheck->new( top_lines => 0 );  # Parse whole files

my @output = $app->parse($tempfile);

my $license    = $output[0];  # => is "GPL-2.0-or-later"
my $copyrights = $output[1];  # => is "2020, 2022 Foo Bar."

DESCRIPTION

App::Licensecheck is the core of licensecheck script to check for licenses of source files. See the script for casual usage.

AUTHOR

Jonas Smedegaard <dr@jones.dk>

COPYRIGHT AND LICENSE

This program is based on the script "licensecheck" from the KDE SDK, originally introduced by Stefan Westerfeld <stefan@space.twc.de>.

Copyright © 2007, 2008 Adam D. Barratt

Copyright © 2012 Francesco Poli

Copyright © 2016-2022 Jonas Smedegaard

Copyright © 2017-2022 Purism SPC

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.