'Return the completions for the given Perl package (traversing
package inheritance, if any).'

def _members_from_pkg(self, pkg_name, pkg, _handled_pkg_names=None):

    if (_handled_pkg_names is None):
        _handled_pkg_names = set()
    if (pkg_name in _handled_pkg_names):
        return []
    _handled_pkg_names.add(pkg_name)
    members = []
    for (name, elem) in pkg.names.items():
        if (elem.tag == 'variable'):
            if ('__local__' not in elem.get('attributes', '')):
                members.append(('variable', name))
        else:
            members.append((elem.get('ilk'), name))
    return members
