perlideeditorcode-completioncode-assist

Searching for Perl IDE with code assist


I am looking for a ide for perl with code assist.
I tried EPIC and Padre but there is something missing...

EPIC has some minor code assist:

#!/use/bin/perl
#Example 1
use strict;
use warnings;
use CGI;

my $q = CGI->n; #it will show new as an option
print $q->h  #it won't show header as an option

Padre won't handle both situations but when I try to use for example '$q->h' again it will use header as an option, which is not the same in EPIC.

Is there an IDE, editor or plugin which can handle 'Example 1'?
If not, is there a way to mix the code assist functionality of EPIC and Padre/Vim or whatever is out there :)

P.s. I am not if I have installed Padre correctly. I am using Ubuntu 11.04 and I did only 'sudo apt-get install padre'. The installation guide says that there are some broken libraries in Ubuntu 11.04 but it works for me or I think it works (it may cause problems for the code assist ^^ who knows... ).


Solution

  • In the source code of CGI.pm there is this comment:

    ###############################################################################
    ################# THESE FUNCTIONS ARE AUTOLOADED ON DEMAND ####################
    ###############################################################################
    
    
    $AUTOLOADED_ROUTINES = '';      # get rid of -w warning
    $AUTOLOADED_ROUTINES=<<'END_OF_AUTOLOAD';
    
    %SUBS = (
    # lots and lots of functions
    'header' => <<'END_OF_FUNC',
    sub header {
      #...
    }
    END_OF_FUNC
      # ...
    )
    END_OF_AUTOLOAD
    ;
    

    So the header() method is created and added to the CGI object at runtime when it is first called.

    Seems to be a feature of dynamically typed languagues. I think this design of CGI.pm happened to make it faster.

    I am not aware of any IDEs that can handle this any more developer-friendly.