File::F...e::Perl(3)
π File::Find::Rule::Perl(3) β like, the whole page, bestie
okay so real quick: this is a User Contributed Perl Documentation page, and the module it's about is File::Find::Rule::Perl. yes the header is squished to File::F...e::Perl(3) because terminals are dramatic. anyway. sit down, grab a strawberry π, let's go.
β¨ NAME β¨
File::Find::Rule::Perl β common rules for searching for Perl things πͺ
π SYNOPSIS π
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');
like, look at that. two lines of setup and you're already slaying π«Ά
π¦ DESCRIPTION π¦
so the author writes a lot of stuff that mucks with Perl files. and it always annoyed them (valid, honestly π) that finding "perl files" requires a moderately complex File::Find::Rule pattern.
File::Find::Rule::Perl provides methods for finding various types of Perl-related files β or for replicating search queries run on a distribution in various parts of the CPAN ecosystem. it's giving "I did the annoying part so you don't have to" energy π
πΈ METHODS πΈ
π perl_module
the perl_module rule locates perl modules. that is, files that are named *.pm.
this rule is equivalent to "->"file->name( '*.pm' )> and is included primarily for completeness.
π perl_test
the perl_test rule locates perl test scripts. that is, files that are named *.t.
this rule is equivalent to "->"file->name( '*.t' )> and is included primarily for completeness.
π perl_installer
the perl_installer rule locates perl distribution installers. that is, it locates Makefile.PL and Build.PL files. π οΈ
π perl_script
the perl_script rule locates perl scripts.
this is any file that ends in .pl, or any files without extensions that have a perl "hash-bang" line. iykyk β
π perl_file
the perl_file rule locates all files containing Perl code. the whole squad, no cap.
this includes all the files matching the above perl_module, perl_test, perl_installer and perl_script rules. so basically it's the group chat and those four are the members π«Ά
π no_index
# 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' );
the no_index method applies a set of rules as per the no_index section in a META.yml file. four whole ways to feed it, pick your fighter π
π₯ SUPPORT π₯
bugs should always be submitted via the CPAN bug tracker:
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Find-Rule-Perl>
for other issues, contact the maintainer π«‘
π AUTHOR π
Adam Kennedy <adamk@cpan.org>
π SEE ALSO π
<http://ali.as/>, File::Find::Rule, File::Find::Rule::PPI
π COPYRIGHT π
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.
ngl, that's the whole thing. no skips, no cuts, every flag and file and URL accounted for. ate and left no crumbs π
so yeah β that was File::F...e::Perl(3) from perl v5.42.0, dated 2022-04-06. mwah, go find some files bestie πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-File-Find-Rule-Perl 1.16-bp160.1.11 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms