Author: radek                        Date: Sun Feb 17 16:37:59 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- switch to File::Find::Rule (I can't be arsed to debug File::Iterator today...)

---- Files affected:
SOURCES:
   pldcpan.pl (1.50 -> 1.51) 

---- Diffs:

================================================================
Index: SOURCES/pldcpan.pl
diff -u SOURCES/pldcpan.pl:1.50 SOURCES/pldcpan.pl:1.51
--- SOURCES/pldcpan.pl:1.50     Thu Jan 10 09:40:04 2008
+++ SOURCES/pldcpan.pl  Sun Feb 17 17:37:54 2008
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 # Requirements:
 # perl-Pod-Tree perl-Archive-Any perl-Template-Toolkit perl-YAML perl-IO-String
-# perl-File-Iterator perl-Module-CoreList
+# perl-File-Find-Rule perl-Module-CoreList
 use strict;
 
 use Cwd qw( getcwd );
@@ -15,7 +15,7 @@
 use YAML             ();
 use Digest::MD5      ();
 use IO::String       ();
-use File::Iterator   ();
+use File::Find::Rule ();
 use Module::CoreList ();
 use LWP::Simple      ();
 
@@ -221,14 +221,9 @@
                warn " .. unable to search for \$pod_file without parts\n";
                return $info->{_tests}->{find_pod_file} = 0;
        }
-       my $it = File::Iterator->new(
-               DIR     => $info->{dir},
-               RECURSE => 1,
-               FILTER =>
-                 sub { $_[0] =~ m#(?:^|/)\Q$mfile\E\.(?:pod|pm)$# && $_[0] !~ 
m#/t/# }
-       );
+
        my ($pm, $pod);
-       while (my $f = $it->next()) {
+       for my $f ( grep !m#/t/#, File::Find::Rule->file->name( "$mfile.pod", 
"$mfile.pm", )->in( $info->{dir} ) ) {
                $pod = $f if $f =~ /\.pod$/;
                $pm  = $f if $f =~ /\.pm$/;
        }
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/pldcpan.pl?r1=1.50&r2=1.51&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to