Stories
Slash Boxes
Comments
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)

richardc
  (email not shown publicly)
http://unixbeard.net/~richardc/

Journal of richardc (1662)

Friday July 26, 2002
08:17 AM

and breathe out

[ #6660 ]

The uploaded file
    File-Find-Rule-0.01.tar.gz
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.
 Full
 Abbreviated
 Hidden
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.
    --

    --
    xoa

    • 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