File-Finder

 view release on metacpan or  search on metacpan

lib/File/Finder/Steps.pm  view on Meta::CPAN


=head1 DESCRIPTION

C<File::Finder::Steps> provide the predicates being tested for
C<File::Finder>.

=head2 STEPS METHODS

These methods are called on a class or instance to add a "step".  Each
step adds itself to a list of steps, returning the new object.  This
allows you to chain steps together to form a formula.

As in I<find>, the default operator is "and", and short-circuiting is
performed.

Note: the C<user>, C<nouser>, C<group>, C<nogroup>, and C<ls> methods
are not available on Win32 systems.

=over

=item or

lib/File/Finder/Steps.pm  view on Meta::CPAN

  find($big_or_old->ls, "/tmp");

You need parens because the "or" operator is lower precedence than
the implied "and", for the same reason you need them here:

  find /tmp -type f '(' -size +100 -o -mtime +90 ')' -print

Without the parens, the -type would bind to -size, and not to the
choice of -size or -mtime.

Mismatched parens will not be found until the formula is used, causing
a fatal error.

=cut

sub right { return "right" }
BEGIN { *end = \&right; }

=item begin

Alias for C<left>.



( run in 4.536 seconds using v1.01-cache-2.11-cpan-5837b0d9d2c )