def _addPerlProvides(self, path, m, pkgFiles):
        # do not call perl to get @INC unless we have something to do for perl
        self._fetchPerlIncPath()

        # It is possible that we'll want to allow user-specified
        # additions to the perl search path, but if so, we need
        # to path-encode those files, so we can't just prepend
        # those elements to perlIncPath.  We would need to end up
        # with something like "perl: /path/to/foo::bar" because
        # for perl scripts that don't modify @INC, they could not
        # find those scripts.  It is not clear that we need this
        # at all, because most if not all of those cases would be
        # intra-package dependencies that we do not want to export.

        depPath = None
        for pathPrefix in self.perlIncPath:
            if path.startswith(pathPrefix):
                depPath = path[len(pathPrefix)+1:]
                break
        if depPath is None:
            return

        # foo/bar/baz.pm -> foo::bar::baz
        prov = '::'.join(depPath.split('/')).rsplit('.', 1)[0]
        dep = deps.Dependency(prov, [])
        for pkg, _ in pkgFiles:
            self._addDepToMap(path, pkg.providesMap, deps.PerlDependencies, dep)