in reply to Re: perl find module
in thread perl find module

but as its interface is rather arcane

Let me respectfully disagree with that - the interface is flexible, well documented - and low-level. It is by no means arcane.

The only obscure thing about File::Find is, IMHO, the name. It's not primarily a module to find files -- it's an iterator over files and directories (which you can use to find files, but also for various other things).

Replies are listed 'Best First'.
Re^3: perl find module
by CountZero (Bishop) on Oct 27, 2009 at 15:13 UTC
    I agree the interface is flexible, well documented and low-level, but the use of call-backs is something which is not immediately easy to understand, especially not for someone who is rather new to Perl and/or this type of programming. Hence, I call it "arcane" in the meaning of "obscure". I have to look-up the docs every time I want to use File::Find, there are too many "global" variables which contain all kinds of information some of which are to be read-only, others act as flags, ...

    File::Find::Rulen as a wrapper around File::Findn brings its interface nicely within the more familiar procedural or OO-environment.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re^3: perl find module
by ikegami (Patriarch) on Oct 27, 2009 at 14:31 UTC
    It's usage isn't arcane if closures are used, but they aren't used in any example in the documentation. They aren't mentioned at all!