Scratching an itch - interpolable HTTP Status constants
When working on larger web applications, I prefer to use HTTP::Status to provide human-readable constant names in the code. This is especially helpful for anything other than the common 200, 404 or 500 status codes.
But the constants exported by HTTP::Status are basically subs:
if ($response->code == HTTP_OK) { ... }
this is fine for most cases, but not when you want interpolable variables, for example, in hash keys.
So I wrote HTTP::Status::Constants. It's a simple wrapper around HTTP::Status that provides read-only scalar constants for the HTTP_*
constants.