.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" 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::Procedural 3"
.TH File::Find::Rule::Procedural 3 "2015-12-03" "perl v5.26.3" "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::Procedural \- File::Find::Rule's procedural interface
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\& use File::Find::Rule;
\&
\& # find all .pm files, procedurally
\& my @files = find(file => name => \*(Aq*.pm\*(Aq, in => \e@INC);
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
In addition to the regular object-oriented interface,
File::Find::Rule provides two subroutines for you to use.
.ie n .IP """find( @clauses )""" 4
.el .IP "\f(CWfind( @clauses )\fR" 4
.IX Item "find( @clauses )"
.PD 0
.ie n .IP """rule( @clauses )""" 4
.el .IP "\f(CWrule( @clauses )\fR" 4
.IX Item "rule( @clauses )"
.PD
\&\f(CW\*(C`find\*(C'\fR and \f(CW\*(C`rule\*(C'\fR can be used to invoke any methods available to the
\&\s-1OO\s0 version. \f(CW\*(C`rule\*(C'\fR is a synonym for \f(CW\*(C`find\*(C'\fR
.PP
Passing more than one value to a clause is done with an anonymous
array:
.PP
.Vb 1
\& my $finder = find( name => [ \*(Aq*.mp3\*(Aq, \*(Aq*.ogg\*(Aq ] );
.Ve
.PP
\&\f(CW\*(C`find\*(C'\fR and \f(CW\*(C`rule\*(C'\fR both return a File::Find::Rule instance, unless
one of the arguments is \f(CW\*(C`in\*(C'\fR, in which case it returns a list of
things that match the rule.
.PP
.Vb 1
\& my @files = find( name => [ \*(Aq*.mp3\*(Aq, \*(Aq*.ogg\*(Aq ], in => $ENV{HOME} );
.Ve
.PP
Please note that \f(CW\*(C`in\*(C'\fR will be the last clause evaluated, and so this
code will search for mp3s regardless of size.
.PP
.Vb 4
\& my @files = find( name => \*(Aq*.mp3\*(Aq, in => $ENV{HOME}, size => \*(Aq<2k\*(Aq );
\& ^
\& |
\& Clause processing stopped here \-\-\-\-\-\-/
.Ve
.PP
It is also possible to invert a single rule by prefixing it with \f(CW\*(C`!\*(C'\fR
like so:
.PP
.Vb 5
\& # large files that aren\*(Aqt videos
\& my @files = find( file =>
\& \*(Aq!name\*(Aq => [ \*(Aq*.avi\*(Aq, \*(Aq*.mov\*(Aq ],
\& size => \*(Aq>20M\*(Aq,
\& in => $ENV{HOME} );
.Ve
.SH "AUTHOR"
.IX Header "AUTHOR"
Richard Clamp <richardc@unixbeard.net>
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (C) 2003 Richard Clamp. All Rights Reserved.
.PP
This module is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
File::Find::Rule