Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
OK, I admit it, I'm a Perl programmer that has been enamored by many nice things in Ruby, like array arithmetics, several syntax sugars, and the pure OO stuffs. Exceptions is also one of them. When I write small scripts that open or write files, and an I/O error happens, usually failing miserably is my preferred default behaviour. With exception I can be lazy and not handle I/O errors. But when I want to handle some errors, I can start adding try/catch blocks to my code.
Now Fatal and Error are pretty close to what I want, I just wish they can be combined somehow, now that would be gold. (PS: No, Error::SystemException is close but no cigar. I don't want to have to throw exceptions explicitly everytime.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Advices on doing exception-style programming in Perl?
by friedo (Prior) on Nov 19, 2007 at 14:14 UTC | |
|
Re: Advices on doing exception-style programming in Perl?
by TOD (Friar) on Nov 19, 2007 at 13:21 UTC | |
|
Re: Advices on doing exception-style programming in Perl?
by Anonymous Monk on Nov 19, 2007 at 23:26 UTC |