First version of Perl5 plugin for IntelliJ IDEA been released today. Plugin allows you to work on Perl5 projects using different JetBrains IDEs.

Implemented features

Creating Perl5 module and selecting Perl5 interpreter as an SDK.

Parsing for Perl5 and POD files, Mojolicious templates and PHP-like templates.

Syntax highlighting.

Highlighting and matching for braces, quotes and regex delimiters.

Interpolation in appropriate strings, regexes and here-docs.

Auto-completion, navigation and refactoring for subs, methods, packages, namespaces, constants and variables.

Fast navigation for subs, global variables, namespaces and constants (Go to symbol/class)

File structure view

Class hierarchy view

Inheritance support with C3/DFS mro

Imports/Exports support

AUTOLOAD-ed subs resolution

File templates for scripts, packages and Mojo templates

Live templates for different language constructions

Support of global variables declaration with use vars

Here-docs markers navigation and re-factoring

IntelliLang integration: allows to inject different language to the here-doc, depending on here-doc marker text.

Annotations for subs: #@deprecated, #@method, #@returns

Annotations for namespaces: #@deprecated

Variables declaration types support

Intentions:

Convert string to here-doc

Inspections:

Packages and namespaces: missing package file, unknown namespace, multiple namespace definitions, clash with core namespace, missing strict/warnings pragmas.



Variables: unused variables, undefined variables, variables shadowing, re-declaring of built-in variables.



Subs and constants: deprecated sub, unresolvable sub, multiple subs definitions, fancy method call (new Foo::Bar), unused subs, constants and globs.

Extension point to implement package processors, allowing to describe package behavior (like Mojo::Base acts like strict, warnings, features and base at once)

All features are not perfect and may be improved. I've implemented my view of required minimum. More detailed information may be found in our wiki

I'd like to thank all Monks who helped me on my 4 month adventure with advices and answers.

Plans

Well, it's hard to say about future. I've got tons of different ideas, usually I've implemented one thing and got ideas about two more. But we'll see. Anyway what I really want to do:

Improve parser (especially errors-recovery)

Improve already implemented features

Improve performance

Write tests

Integrate with popular Perl5 frameworks and template engines.

Perlbrew integration

Integration with libs like PerlTidy, PerlCritic, CPAN

Debugger

Perl6. Well, I wanted to start with it to train a bit, because it has some formalized grammar. But I dont know language at all, it was not yet released, it's not performs well as I've read. But everything is possible.

Links

Bugreports and feature requests are always welcome!