szabgab has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Calltips for Padre
by LesleyB (Friar) on Sep 11, 2008 at 15:34 UTC | |
by szabgab (Priest) on Sep 11, 2008 at 15:40 UTC | |
|
Re: Calltips for Padre
by j1n3l0 (Friar) on Sep 11, 2008 at 15:53 UTC | |
by szabgab (Priest) on Sep 11, 2008 at 15:58 UTC | |
|
Re: Calltips for Padre
by tod222 (Pilgrim) on Sep 11, 2008 at 19:11 UTC | |
|
Re: Calltips for Padre
by moritz (Cardinal) on Sep 12, 2008 at 07:38 UTC | |
by szabgab (Priest) on Sep 12, 2008 at 08:22 UTC | |
|
Re: Calltips for Padre
by manni (Novice) on Sep 12, 2008 at 06:50 UTC | |
by szabgab (Priest) on Sep 12, 2008 at 10:04 UTC | |
|
Re: Calltips for Padre
by wazoox (Prior) on Sep 12, 2008 at 14:04 UTC |