App-Licensecheck

 view release on metacpan or  search on metacpan

bin/licensecheck  view on Meta::CPAN

#!perl

use v5.12;
use utf8;
use open qw(:locale);
use warnings;
use autodie;

=head1 NAME

licensecheck - simple license checker for source files

=head1 VERSION

Version v3.3.10

=head1 SYNOPSIS

    licensecheck [ --help | --version ]

    licensecheck [ --list-licenses | --list-naming-schemes ]

    licensecheck [OPTION...] PATH [PATH...]

=head1 DESCRIPTION

B<licensecheck> attempts to determine the license
that applies to each file passed to it,
by searching the start of the file
for text belonging to various licenses.

If any of the arguments passed are directories,
B<licensecheck> will add the files contained within
to the list of files to process.

When multiple F<PATH>s are provided,
only files matching B<--check> and not B<--ignore> are checked.

=cut

use Getopt::Long 2.24 qw(:config gnu_getopt);
use IO::Interactive   qw(is_interactive);

my $USE_COLOR;

BEGIN {
	$USE_COLOR = !(
		   exists $ENV{NO_COLOR}
		or ( $ENV{COLOR} and !$ENV{COLOR} )
		or !is_interactive
	);
	$Pod::Usage::Formatter = 'Pod::Text::Color' if $USE_COLOR;
}
use Pod::Usage 1.60;
my $COPYRIGHT;
use Pod::Constants
	-trim                   => 1,
	'COPYRIGHT AND LICENSE' =>
	sub { ($COPYRIGHT) = s/C<< (.*) >>/$1/gr; $COPYRIGHT =~ s/©/©/g };
use String::License::Naming::Custom;
use Path::Tiny;
use Path::Iterator::Rule;
use String::Escape  qw(unbackslash);
use List::Util 1.45 qw(uniqstr);
use Log::Any        qw($log);



( run in 0.510 second using v1.01-cache-2.11-cpan-ceb78f64989 )