Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Does File::Find always visit files before subdirs?

by Anonymous Monk
on Aug 05, 2012 at 16:25 UTC ( #985550=note: print w/ replies, xml ) Need Help??


in reply to Does File::Find always visit files before subdirs?

I would not make that assumption. The "correct" behavior of your program should not be a side-effect: your code should be such that it compels the right behavior to occur, and such that it is abundantly clear what the right behavior is supposed to be. If you need to find directories first, then go find only-directories first. Then, go find files ignoring directories. If the module says that the behavior you are looking for is or can be guaranteed, explicitly mention that guarantee in your source-code, and if an option controls it, explicitly set that option even if it's currently the default. Packages do change their behavior sometimes. Sometimes by design; sometimes because they never promised you a rose-garden in the first place.


Comment on Re: Does File::Find always visit files before subdirs?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2013-05-24 00:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (493 votes), past polls