logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Author

       Jonas Smedegaard "<dr@jones.dk>"

Description

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

Name

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

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."

Version

       Version v3.3.9

See Also