File::Find::Rule::Perl now supports META.yml no_index

Alias on 2009-02-19T01:03:52

http://svn.ali.as/cpan/releases/File-Find-Rule-Perl-1.05.tar.gz

After more than the usual mucking around with the API look, I've finally managed to get support for META.yml's no_index entry implemented in my "doin' Perl stuff" File::Find::Rule plugin, File::Find::Rule::Perl.

I've managed to get it to be very very easy to use in the simple cases, while being flexible enough for all the various things people might use it for.

The four different usages are demonstrated in the following sample code, taken from the module docs. # Provide the rules directly $rule->no_index( directory => [ 'inc', 't', 'examples', 'lib/ignore' ], file => [ 'Foo.pm', 'lib/Foo.pm' ], );

# Provide a META.yml to use $rule->no_index( 'META.yml' );

# Provide a dist root directory to look for a META.yml in $rule->no_index( 'My-Distribution' );

# Automatically pick up a META.yml from the target directory $rule->no_index->in( 'My-Distribution' );


As per the META.yml spec (once convention is codified) exclusions as root-relative multi-part Unix paths.

In this case, the "root-relative" part is always implemented relative to the directories provided to the ->in method, so this method isn't going to be useful for scanning an expanded minicpan or any other tree with multiple nested META.yml files.

But, when combined with File::Find::Rule::VCS, it should be trivial now to write your own tools for analysing Perl code in your modules in the same way PAUSE does, with something like this. my @perl = File::Find::Rule->ignore_svn->no_index->perl_file;

Now I just need to go through and update all my stuff to use it.