in reply to Module wants to die! How do I handle this?

Hi JD. The module is trying to throw an exception. This is generally better than using return codes. To handle exceptions in perl, use the block form of eval. Check out the perlfun man page (or Programming Perl) for the details.
  • Comment on Re: Module wants to die! How do I handle this?

Replies are listed 'Best First'.
Re^2: Module wants to die! How do I handle this?
by ysth (Canon) on Jul 12, 2005 at 00:00 UTC
    This is generally better than using return codes.
    Depends on what kind of programming you are doing, and what you feel comfortable with. I've found return codes to be better to my taste in most cases.
      You're certainly entitled to do it your own way, but modern programming practice is moving away from return codes to indicate errors and toward exceptions. You can see this in most recent books and in the prominent place exceptions have in recently designed languages.