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 }
In reply to Re: OOP style question: Checking a value
by jdtoronto
in thread OOP style question: Checking a value
by spq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |