Incidental question. Why are you returning the string 'SUCCESS' rather than just using true/false normally?
Readability in the sample code.
In real life, I'd probably return undef for success, an arbitrary error description string for failure, and use if ($result->{$key}) to scan for errors.
I do prefer human-readable error messages over simple booleans, though.
They give me better feedback, and more ways to track down errors while debugging.
Your brick upside the head is appreciated, though.
That's two people whose opinions I respect not telling me that I've gone completely wacko.
Thanks.