30 Mar 2022 04:02:02 UTC
- Distribution: File-Find-Rule-Perl
- Module version: 1.16
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (1134 / 0 / 0)
- KwaliteeBus factor: 1
- % Coverage
- License: perl_5
- Perl: v5.6.0
- Activity24 month
- Download (7.63KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:ETHER Karen Etheridge 🐾 🌋🦑🇹🇼🇭🇰🇺🇦
- SEE ALSO
File::Find::Rule::Perl - Common rules for searching for Perl things
use File::Find::Rule (); use File::Find::Rule::Perl (); # Find all Perl files smaller than 10k my @files = File::Find::Rule->perl_file ->size('<10Ki') ->in('dir'); # Locate all the modules that PAUSE will index my @mod = File::Find::Rule->no_index ->perl_module ->in('My-Distribution');
I write a lot of things that muck with Perl files. And it always annoyed me that finding "perl files" requires a moderately complex File::Find::Rule pattern.
File::Find::Rule::Perl provides methods for finding various types Perl-related files, or replicating search queries run on a distribution in various parts of the CPAN ecosystem.
perl_modulerule locates perl modules. That is, files that are named
This rule is equivalent to
->file->name( '*.pm' )> and is included primarily for completeness.
perl_testrule locates perl test scripts. That is, files that are named
This rule is equivalent to
->file->name( '*.t' )> and is included primarily for completeness.
perl_installerrule locates perl distribution installers. That is, it locates
perl_scriptrule locates perl scripts.
This is any file that ends in .pl, or any files without extensions that have a perl "hash-bang" line.
perl_filerule locates all files containing Perl code.
This includes all the files matching the above
# Provide the rules directly $rule->no_index( directory => [ 'inc', 't', 'examples' ], 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' );
no_indexmethod applies a set of rules as per the no_index section in a
Bugs should always be submitted via the CPAN bug tracker
For other issues, contact the maintainer
Adam Kennedy <firstname.lastname@example.org>
Copyright 2006 - 2012 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
Module Install Instructions
To install File::Find::Rule::Perl, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install File::Find::Rule::Perl
For more information on module installation, please visit the detailed CPAN module installation guide.