84: def split_module(path)
85:
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:
101:
102:
103: Puppet::Module.modulepath.each do |mp|
104:
105: dirname = fullpath
106: while (dirname = File.dirname(dirname)) != '/'
107: return nil if File.identical?(dirname,mp)
108: end
109: end
110: end
111:
112: Puppet.debug "rdoc: global manifests"
113: SITE
114: end