in reply to Re^3: Perl Best Practices
in thread Perl Best Practices
Exceptions suffer exceptions :), for instance for programs that mustn't die whatever happensIn which case the top level of the program needs to be running inside an eval{...} anyway, to protect it from intrinsic exceptions like divide-by-zero or call-on-missing-method. So exceptions are still okay, as they'll always be caught.
And concerning the 8th perl coding practice: could you explain it a bit?Sure, but an adequate explanation is about 30 pages long. Which is why I put it in a handy book, very soon to be available from most good bookstores. ;-)
Briefly, always using /x allows you to set out regexes readably, and to comment them. Always using /ms makes Perl regexes work the way most people expect them to work, and prevents very subtle edge-case errors. Using \A and \z is essential for saying what you mean under /m (which you'll always be using).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Perl Best Practices
by wazoox (Prior) on Jul 19, 2005 at 14:53 UTC | |
by jplindstrom (Monsignor) on Jul 19, 2005 at 16:17 UTC | |
by wazoox (Prior) on Jul 19, 2005 at 17:29 UTC | |
by Anonymous Monk on Jul 19, 2005 at 17:55 UTC | |
by wazoox (Prior) on Jul 19, 2005 at 22:25 UTC | |
|