in reply to OOP style question: Checking a value
In general, when I want to check for a specific state, I make a method for it rather than expose internal values:eval { $client->blinky_blinky; }; if (my $err = $@) { if ($err->isa('NotFoundError') { # do something } else { $err->rethrow; } }
The HTTP::Response class is a good example for this kind of stuff as well.$client->response->is_ok; $client->response->is_not_found;
|
|---|