in reply to OOP style question: Checking a value
If anything, no 5. 1 & 2 make the OK look far too much like a bareword which is uncomfortable when using strictures. 3 & 4 needlessly repeat the object name, so 5 is the most compact. But why not test for truth and only look at the response when the return value fails?
Or as you suggest, you could use an eval, but why?if ( $client->response ) { #then do whatever } else { #probe for the bad news here }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: OOP style question: Checking a value
by spq (Friar) on Aug 29, 2006 at 21:04 UTC |