Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by tphyahoo (Vicar)
on Jul 17, 2006 at 10:46 UTC ( [id://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 > my-find-script-template.pl chmod u+x my-find-script-template.pl

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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://561729]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-03-29 08:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found