X-Git-Url: http://wagnertech.de/git?p=kivitendo-erp.git;a=blobdiff_plain;f=scripts%2Ffind-use.pl;fp=scripts%2Ffind-use.pl;h=b2a3c0dafeb2447ab1617cac9bb5bcc6b7146111;hp=3df14f4591c0833acea67fcca9a44d75a79b9736;hb=53593baa211863fbf66540cf1bcc36c8fb37257f;hpb=deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44 diff --git a/scripts/find-use.pl b/scripts/find-use.pl index 3df14f459..b2a3c0daf 100755 --- a/scripts/find-use.pl +++ b/scripts/find-use.pl @@ -1,4 +1,12 @@ #!/usr/bin/perl -l + +BEGIN { + use FindBin; + + unshift(@INC, $FindBin::Bin . '/../modules/override'); # Use our own versions of various modules (e.g. YAML). + push (@INC, $FindBin::Bin . '/..'); # '.' will be removed from @INC soon. +} + use strict; #use warnings; # corelist and find throw tons of warnings use File::Find; @@ -23,6 +31,7 @@ my (%uselines, %modules, %supplied, %requires); 'Rose::DB::Object::Metadata' => 1, 'Rose::DB::Object::Helpers' => 1, 'Rose::DB::Object::Util' => 1, + 'Rose::DB::Object::Constants' => 1, }, 'Rose::Object' => { 'Rose::Object::MakeMethods::Generic' => 1, @@ -48,13 +57,24 @@ my (%uselines, %modules, %supplied, %requires); }, 'Archive::Zip' => { 'Archive::Zip::Member' => 1, - } + }, + 'HTML::Parser' => { + 'HTML::Entities' => 1, + }, + 'URI' => { + 'URI::Escape' => 1, + }, + 'File::MimeInfo' => { + 'File::MimeInfo::Magic' => 1, + }, ); GetOptions( 'files-with-match|l' => \ my $l, ); +chmod($FindBin::Bin . '/..'); + find(sub { return unless /(\.p[lm]|console)$/; @@ -69,6 +89,7 @@ find(sub { next if /SL::/; next if /Support::Files/; # our own test support module next if /use (warnings|strict|vars|lib|constant|utf8)/; + next if /^use (with|the)/; my ($useline) = m/^use\s+(.*?)$/; @@ -124,7 +145,7 @@ $modules{$_->{name}} ||= { status => 'required' } for @SL::InstallationCheck::re $modules{$_->{name}} ||= { status => 'optional' } for @SL::InstallationCheck::optional_modules; $modules{$_->{name}} ||= { status => 'developer' } for @SL::InstallationCheck::developer_modules; -# build transitive closure for documented dependancies +# build transitive closure for documented dependencies my $changed = 1; while ($changed) { $changed = 0; @@ -202,7 +223,6 @@ find-use =head1 EXAMPLE # perl scipts/find-use.pl - !missing : Perl::Tags !missing : Template::Constants !missing : DBI @@ -229,7 +249,7 @@ This module is included in C. Don't worry about it. =item required This module is documented in C to be necessary, or is a -dependancy of one of these. Everything alright. +dependency of one of these. Everything alright. =item !missing