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

def _func_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 = [('function', n) for (n, el) in pkg.names.items() if (el.get('ilk') == 'function')]
    for classref in pkg.get('classrefs', '').split():
        if (classref == 'Exporter'):
            continue
        self.info('add    inherited    functions    from    %r', classref)
        classref_pkg = self.pkg_tbl.pkg_from_pkg_name(classref)
        members += self._func_members_from_pkg(classref, classref_pkg, _handled_pkg_names)
    return members
