def get_qualified_name(obj):
    """Retrieve the full module path of an object.

    Example:

    .. code-block:: python

        from watson.http.messages import Request
        request = Request()
        name = get_qualified_name(request) # watson.http.messages.Request
    """
    try:
        name = obj.__qualname__
    except AttributeError:
        try:
            name = obj.__class__.__name__
        except Exception:
            name = obj.__name__
    try:
        module = obj.__module__
        return '{0}.{1}'.format(module, name)
    except Exception:
        return name
