I am not sure if the more experienced users will need the calltip feature but it seems that when you are a beginner and type a perl command it helps if your editor shows you what parameters can you give to that function.
I created a screenshot showing an example on Padre 0.08.
So far what I did was creating a hash such as this:
The question is if I have to create this mapping for all the functions or if I can fetch it from somewhere?my %keywords = ( chomp => '(STRING)', substr => '(EXPR, OFFSET, LENGTH, REPLACEMENT)', index => '(STR, SUBSTR, INDEX)', pop => '(@ARRAY)', psush => '(@ARRAY, LIST)', print => '(LIST) or (FILEHANDLE LIST)', join => '(EXPR, LIST)', split => '(/PATTERN/,EXPR,LIMIT)', wantarray => '()', );
I looked at the perlfunc.pod and for every function it has several =item funcname PARAMS entries providing all the possible paramters.
I might build the list from there on the fly but I think it might be better to put the examples in order of how common they are or show only the most common one to reduce confusion.
In case you wonder, if I create a mapping, I'll certainly will make it separate from Padre so other IDEs or editors will be able to use it.
Actually this might be interesting to and advanced user as well especially when she is looking at functions or methods she does not use often.
I wonder if the same functionality could be or should be provided
for standard modules too? What about the general case of CPAN?
What about DarkPAN, that is modules in companies or otherwise
not on CPAN?
Can we define some way to fetch the signature of functions from
the documentation of the module?
What do you think? How should this be solved?
In reply to Calltips for Padre by szabgab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |