Hello!
I’m generally using Komodo for perl. My problem is what i’m use named params
like
sub abc {
my %params = (
somename => undef,
@_
);
}
or even with Validate::Params module.
Komodo show calltips for functions, but fail for params, because it shows only params what i’ll access via “shift”.
Is there way to show propper calltips for function params? Maybe some special formatted comment?
p.s.
sorry for my english, hope you understand my needs.
Heey, new man from Russia on our Forums!
Привет, теска)
No one?! Is it possible at all?
Wait for @toddw or @nathanr . If you really want to work with Perl like a boss - try ActivePerl.
1 Like
Ok, I’ll wait. BTW I’m already in ActivePerl, actually this is not a active perl issue… (
Defman
July 11, 2014, 2:36pm
7
Did you fix your problem?
I’m thinking about to write me own extension, based on POD, or phpdocs like format. Just haven’t time now for it.
toddw
July 16, 2014, 11:51pm
11
It’s because the Komodo code intelligence parser doesn’t handle this style of argument passing:
my %params = ( foo => undef, @_ );
thus it doesn’t show a calltip with arguments. The code in question is in the collect_single_arg function:
isArg = self._is_stmt_end_op(tok)
else:
tok = self.tokenizer.put_back(tok)
for varInfo in nameList:
if isArg: self.moduleInfo.doSetArg(varInfo[0])
self.moduleInfo.doSetVar(name=varInfo[0], line=varInfo[1],
scope=var_scope)
# end collect_multiple_args
# Expect = shift ;
def collect_single_arg(self, varName, origLineNo, context, var_scope):
tok = self.tokenizer.get_next_token()
if not self.classifier.is_operator(tok, '='):
isArg = False
else:
tok = self.tokenizer.get_next_token()
if self.classifier.is_keyword(tok, 'shift') or tok['text'] == '@_':
tok = self.tokenizer.get_next_token()
isArg = self._is_stmt_end_op(tok)
self.tokenizer.put_back(tok)
else:
Thank you @toddw . I’ll look closer to collect_single_arg
@toddw but is there way to show calltips with params/function description?
Like Komodo do if found phpdoc documentation.
toddw
July 22, 2014, 3:54pm
14
Not that I know of - there are some special perldoc handling routines in the parser code, but I couldn’t get an example where it would work for displaying calltips for functions.