fixed builtin/module ambiguity for perldoc
--HG-- branch : pmacs2
This commit is contained in:
parent
6fd4cb109f
commit
48571071c1
19
mode/perl.py
19
mode/perl.py
|
@ -257,15 +257,16 @@ class PerlViewWordPerldoc(Method):
|
||||||
w.application.set_error('invalid word: %r' % word)
|
w.application.set_error('invalid word: %r' % word)
|
||||||
return
|
return
|
||||||
|
|
||||||
# first try it is a package
|
# first try it is a package, unless it's a builtin
|
||||||
parts = word.split('::')
|
if not token.name == "perl_builtin":
|
||||||
while len(parts) > 0:
|
parts = word.split('::')
|
||||||
newword = '::'.join(parts)
|
while len(parts) > 0:
|
||||||
data = self._try(w, newword, asfunc=False)
|
newword = '::'.join(parts)
|
||||||
if data:
|
data = self._try(w, newword, asfunc=False)
|
||||||
self._show(w, data, newword)
|
if data:
|
||||||
return
|
self._show(w, data, newword)
|
||||||
parts.pop(-1)
|
return
|
||||||
|
parts.pop(-1)
|
||||||
|
|
||||||
# then try it as a function
|
# then try it as a function
|
||||||
data = self._try(w, word, asfunc=True)
|
data = self._try(w, word, asfunc=True)
|
||||||
|
|
Loading…
Reference in New Issue