]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Patch for bug 258579: t/Support/Files.pm should use File::Find; patch by Marc Schuman...
authorjocuri%softhome.net <>
Tue, 7 Dec 2004 01:02:44 +0000 (01:02 +0000)
committerjocuri%softhome.net <>
Tue, 7 Dec 2004 01:02:44 +0000 (01:02 +0000)
t/Support/Files.pm

index ffadc562c43a9fb3fcd75ad36ab540a42e5fd58f..2e620204218aeffd8acba81bb3fd88ccd47ff5c5 100644 (file)
@@ -23,6 +23,8 @@
 
 package Support::Files;
 
+use File::Find;
+
 # exclude_deps is a hash of arrays listing the files to be excluded
 # if a module is not available
 #
@@ -33,10 +35,8 @@ package Support::Files;
 );
 
 
-# XXX - this file should really be rewritten to use File::Find or similar
-$file = '*';
-@files = (glob($file), glob('Bugzilla/*.pm'), glob('Bugzilla/*/*.pm'),
-          glob('Bugzilla/*/*/*.pm'));
+@files = glob('*');
+find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/;}, 'Bugzilla');
 
 sub have_pkg {
     my ($pkg) = @_;