.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "File::Find::Rule::Perl 3pm" .TH File::Find::Rule::Perl 3pm "2022-04-02" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" File::Find::Rule::Perl \- Common rules for searching for Perl things .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use File::Find::Rule (); \& use File::Find::Rule::Perl (); \& \& # Find all Perl files smaller than 10k \& my @files = File::Find::Rule\->perl_file \& \->size(\*(Aq<10Ki\*(Aq) \& \->in(\*(Aqdir\*(Aq); \& \& # Locate all the modules that PAUSE will index \& my @mod = File::Find::Rule\->no_index \& \->perl_module \& \->in(\*(AqMy\-Distribution\*(Aq); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" I write a lot of things that muck with Perl files. And it always annoyed me that finding \*(L"perl files\*(R" requires a moderately complex File::Find::Rule pattern. .PP \&\fBFile::Find::Rule::Perl\fR provides methods for finding various types Perl-related files, or replicating search queries run on a distribution in various parts of the \s-1CPAN\s0 ecosystem. .SH "METHODS" .IX Header "METHODS" .SS "perl_module" .IX Subsection "perl_module" The \f(CW\*(C`perl_module\*(C'\fR rule locates perl modules. That is, files that are named \f(CW\*(C`*.pm\*(C'\fR. .PP This rule is equivalent to \f(CW\*(C`\->\*(C'\fRfile\->name( '*.pm' )> and is included primarily for completeness. .SS "perl_test" .IX Subsection "perl_test" The \f(CW\*(C`perl_test\*(C'\fR rule locates perl test scripts. That is, files that are named \f(CW\*(C`*.t\*(C'\fR. .PP This rule is equivalent to \f(CW\*(C`\->\*(C'\fRfile\->name( '*.t' )> and is included primarily for completeness. .SS "perl_installer" .IX Subsection "perl_installer" The \f(CW\*(C`perl_installer\*(C'\fR rule locates perl distribution installers. That is, it locates \f(CW\*(C`Makefile.PL\*(C'\fR and \f(CW\*(C`Build.PL\*(C'\fR files. .SS "perl_script" .IX Subsection "perl_script" The \f(CW\*(C`perl_script\*(C'\fR rule locates perl scripts. .PP This is any file that ends in \fI.pl\fR, or any files without extensions that have a perl \*(L"hash-bang\*(R" line. .SS "perl_file" .IX Subsection "perl_file" The \f(CW\*(C`perl_file\*(C'\fR rule locates all files containing Perl code. .PP This includes all the files matching the above \f(CW\*(C`perl_module\*(C'\fR, \&\f(CW\*(C`perl_test\*(C'\fR, \f(CW\*(C`perl_installer\*(C'\fR and \f(CW\*(C`perl_script\*(C'\fR rules. .SS "no_index" .IX Subsection "no_index" .Vb 5 \& # Provide the rules directly \& $rule\->no_index( \& directory => [ \*(Aqinc\*(Aq, \*(Aqt\*(Aq, \*(Aqexamples\*(Aq ], \& file => [ \*(AqFoo.pm\*(Aq, \*(Aqlib/Foo.pm\*(Aq ], \& ); \& \& # Provide a META.yml to use \& $rule\->no_index( \*(AqMETA.yml\*(Aq ); \& \& # Provide a dist root directory to look for a META.yml in \& $rule\->no_index( \*(AqMy\-Distribution\*(Aq ); \& \& # Automatically pick up a META.yml from the target directory \& $rule\->no_index\->in( \*(AqMy\-Distribution\*(Aq ); .Ve .PP The \f(CW\*(C`no_index\*(C'\fR method applies a set of rules as per the no_index section in a \f(CW\*(C`META.yml\*(C'\fR file. .SH "SUPPORT" .IX Header "SUPPORT" Bugs should always be submitted via the \s-1CPAN\s0 bug tracker .PP .PP For other issues, contact the maintainer .SH "AUTHOR" .IX Header "AUTHOR" Adam Kennedy .SH "SEE ALSO" .IX Header "SEE ALSO" , File::Find::Rule, File::Find::Rule::PPI .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2006 \- 2012 Adam Kennedy. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP The full text of the license can be found in the \&\s-1LICENSE\s0 file included with this module.