Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

richardc (1662)

  (email not shown publicly)

Journal of richardc (1662)

Friday July 26, 2002
08:17 AM

and breathe out

[ #6660 ]

The uploaded file
has entered CPAN as

  file: $CPAN/authors/id/R/RC/RCLAMP/File-Find-Rule-0.01.tar.gz
  size: 7885 byte
   md5: c5ae958e7c110d3e23e8679652a223f8

No action is required on your part

After almost a week of dicking with the docs to try and make them as clear as possible it's released.

Play with, break, enjoy.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Thanks for doin' this, Richard. It's awfully handy to be able to have:
    my $rules = File::Find::Rule->new->file->name( '*.html' );
    $rules->or( $rules->new->directory->name('CVS')->prune->discard, $rules->new );
    my @html = $rules->in( './' );
    to find all the HTML files in my project.


    • Thanks, though I don't think that does quite what you mean.

      What you've constructed is:

      file && name( '*.html' ) && ( ( directory && name( 'CVS' ) && prune && discard ) || anything )

      So it won't be pruning any CVS directories, as file && directory won't fire. The matching path is file && name( '*.html' ) && anything. This does give me an idea though, 0.02 will probably let you query which rules fired for a particular file, if there's a wa