1#!/usr/bin/perl 2# Copyright 2012 Jeffrey Kegler 3# This file is part of Marpa::PP. Marpa::PP is free software: you can 4# redistribute it and/or modify it under the terms of the GNU Lesser 5# General Public License as published by the Free Software Foundation, 6# either version 3 of the License, or (at your option) any later version. 7# 8# Marpa::PP is distributed in the hope that it will be useful, 9# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11# Lesser General Public License for more details. 12# 13# You should have received a copy of the GNU Lesser 14# General Public License along with Marpa::PP. If not, see 15# http://www.gnu.org/licenses/. 16 17use 5.010; 18use strict; 19use warnings; 20use English qw( -no_match_vars ); 21 22use Getopt::Long; 23my $verbose = 1; 24my $result = Getopt::Long::GetOptions( 'verbose=i' => \$verbose ); 25die "usage $PROGRAM_NAME [--verbose=n] file ...\n" if not $result; 26 27## no critic (Modules::RequireBarewordIncludes) 28require 'config/Marpa/PP/License.pm'; 29## use critic 30 31my $file_count = @ARGV; 32my @license_problems = 33 map { Marpa::PP::License::file_license_problems( $_, $verbose ) } @ARGV; 34 35print join "\n", @license_problems or die "print: $ERRNO"; 36 37my $problem_count = scalar @license_problems; 38 39$problem_count and say +( q{=} x 50 ); 40say 41 "Found $problem_count license language problems after examining $file_count files" 42 or die "say: $ERRNO"; 43