# File lib/puppet/util/rdoc/parser.rb, line 84
 84:   def split_module(path)
 85:     # find a module
 86:     fullpath = File.expand_path(path)
 87:     Puppet.debug "rdoc: testing #{fullpath}"
 88:     if fullpath =~ /(.*)\/([^\/]+)\/(?:manifests|plugins|lib)\/.+\.(pp|rb)$/
 89:       modpath = $1
 90:       name = $2
 91:       Puppet.debug "rdoc: module #{name} into #{modpath} ?"
 92:       Puppet::Module.modulepath.each do |mp|
 93:         if File.identical?(modpath,mp)
 94:           Puppet.debug "rdoc: found module #{name}"
 95:           return name
 96:         end
 97:       end
 98:     end
 99:     if fullpath =~ /\.(pp|rb)$/
100:       # there can be paths we don't want to scan under modules
101:       # imagine a ruby or manifest that would be distributed as part as a module
102:       # but we don't want those to be hosted under <site>
103:       Puppet::Module.modulepath.each do |mp|
104:         # check that fullpath is a descendant of mp
105:         dirname = fullpath
106:         while (dirname = File.dirname(dirname)) != '/'
107:           return nil if File.identical?(dirname,mp)
108:         end
109:       end
110:     end
111:     # we are under a global manifests
112:     Puppet.debug "rdoc: global manifests"
113:     SITE
114:   end