Description
Perl modules can return objects that behave differently depending on how the caller uses the result. This is useful for APIs that want to carry success, failure, messages, or structured data in one return value.
It is a developer library. Polymorphic returns can surprise callers, so APIs using them should document expected boolean, string, and object behavior clearly.