'Return Perl package info for this module blob.
Returns a 2-tuple:
(<set of imported module names>, <set of defined package names>)'

def _pkg_info_from_mod(self, mod):

    key = 'perl-pkg-info'
    if (key not in mod.cache):
        mod_names = set(self._imported_mod_names_from_mod(mod))
        pkg_names = set((elem.get('name') for elem in mod if (elem.get('ilk') == 'class')))
        mod.cache[key] = (mod_names, pkg_names)
    return mod.cache[key]
