Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: File::Util list_dir question

by holli (Monsignor)
on Nov 30, 2009 at 17:13 UTC ( #810236=note: print w/ replies, xml ) Need Help??


in reply to Re^2: File::Util list_dir question
in thread File::Util list_dir question

No biggie. The interface of File::Util is non intuitive. Normally a method fatals (dies) or returns some kind of false on failure. File::Util does nothing of this.

It uses a halb baked homegrown error handler that, believe it or not, calls exit on a 'fatal' error (like not being able to recurse into a directory).
That's why you cannot trap it with eval nor with try{}catch{} (at least until said flag is specified).



holli

You can lead your users to water, but alas, you cannot drown them.


Comment on Re^3: File::Util list_dir question
Select or Download Code
Re^4: File::Util list_dir question
by Tommy (Chaplain) on Dec 08, 2009 at 13:37 UTC
    "Half baked homegrown" ... what do you suggest should be different? To use die instead of exit?
    --
    Tommy
      Exactly.


      holli

      You can lead your users to water, but alas, you cannot drown them.
        I'll put that in the queue for next release. Thanks for the suggestion.
        --
        Tommy

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (14)
As of 2015-07-06 18:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (80 votes), past polls