in reply to OOP style question: Checking a value

In this case, I'd probably use Exception::Class objects for each possible type of failure, or else one that contains the error code. For example:
eval { $client->blinky_blinky; }; if (my $err = $@) { if ($err->isa('NotFoundError') { # do something } else { $err->rethrow; } }
In general, when I want to check for a specific state, I make a method for it rather than expose internal values:
$client->response->is_ok; $client->response->is_not_found;
The HTTP::Response class is a good example for this kind of stuff as well.