Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: What makes File::Find's interface so commonly hated

by tphyahoo (Vicar)
on Jul 17, 2006 at 10:46 UTC ( #561729=note: print w/replies, xml ) Need Help??

in reply to What makes File::Find's interface so commonly hated

Everybody who hates File::Find should try the find2perl utility that comes bundled with perl.

find2perl > chmod u+x

It's totally boneheaded utility. As far as I can tell, all it does is output the template for a basic file finder with perl, which you can then modify per your requirements.

Well, actually, it's a little more powerful than that, but I never figured out how to give arguments to this script. I just output and tweak.

And yet... and yet... what a help that is!

Try it if you haven't. :)

Replies are listed 'Best First'.
Re^2: What makes File::Find's interface so commonly hated
by Aristotle (Chancellor) on Jul 17, 2006 at 13:47 UTC

    Itís not that I have trouble figuring out how to use File::Find, and I doubt all the experienced programmers who are outspoken about its interface have any either. Iíve made it do a lot of things it was probably never meant to. But doing simple things is much less simple than it could be, and some of the hard things are not even possible at all Ė in short, the interface runs counter to general Perl philosophy.

    Makeshifts last the longest.

      Maybe more experienced people and less experienced people hate File::Find in a different way.


      As for me, I've learned to appreciate it, like a cranky old table saw that isn't always completely predictable, but that I rely on to get the job done.

Re^2: What makes File::Find's interface so commonly hated
by qbxk (Friar) on Jul 18, 2006 at 17:19 UTC
    haha, they think constants are annoying too:
    ~ $ find2perl =snip # for the convenience of &wanted calls, including -eval statements: use vars qw/*name *dir *prune/; *name = *File::Find::name; *dir = *File::Find::dir; *prune = *File::Find::prune; =snip

    Hey good find on the find2perl script! i like it

    It's not what you look like, when you're doin' what youíre doin'.
    It's what youíre doin' when youíre doin' what you look like youíre doin'!
         - Charles Wright & the Watts 103rd Street Rhythm Band, Express yourself

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://561729]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2018-07-16 22:46 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (352 votes). Check out past polls.