WebshopApi: File upload Übersetzungen
[kivitendo-erp.git] / scripts / find-use.pl
index bd58c07..8078e50 100755 (executable)
@@ -1,4 +1,13 @@
 #!/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.
+  push   (@INC, $FindBin::Bin . '/../modules/fallback'); # Only use our own versions of modules if there's no system version.
+}
+
 use strict;
 #use warnings; # corelist and find throw tons of warnings
 use File::Find;
@@ -21,6 +30,9 @@ my (%uselines, %modules, %supplied, %requires);
    'Rose::DB::Object::ConventionManager' => 1,
    'Rose::DB::Object::Manager'           => 1,
    '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,
@@ -32,6 +44,7 @@ my (%uselines, %modules, %supplied, %requires);
     'Template::Plugin'                   => 1,
     'Template::Plugin::Filter'           => 1,
     'Template::Plugin::HTML'             => 1,
+    'Template::Stash'                    => 1,
   },
   'Devel::REPL' => {
     'namespace::clean'                   => 1,
@@ -43,16 +56,30 @@ my (%uselines, %modules, %supplied, %requires);
     'TAP::Parser'                        => 1,
     'TAP::Parser::Aggregator'            => 1,
   },
+  '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)$/;
 
-  # remember modules shipped with Lx-Office
+  # remember modules shipped with kivitendo
   $supplied{modulize($File::Find::name)}++
     if $File::Find::dir =~ m#modules/#;
 
@@ -63,6 +90,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+(.*?)$/;
 
@@ -242,5 +270,3 @@ Sven Schöling E<lt>s.schoeling@linet-services.deE<gt>
 Distributed under the terms of the GNU General Public License v2.
 
 =cut
-
-