in reply to Annotations for Perl

Of course, it's possible to constantly work on smart algorythms, which will be able to analyse previous sub in "dereference" chain and try to guess, what was returned.

But it's an endless work as a Perl itself and resourse-consuming.

Sure, if you try to write it in Java. If you write it in perl its considerably easier, PPI, http://deps.cpantesters.org/depended-on-by.pl?dist=PPI-1.220, Pod::Coverage::Moose, Devel::Cover, Devel::PerlySense

Replies are listed 'Best First'.
Re^2: Annotations for Perl
by hurricup (Pilgrim) on Jun 03, 2015 at 05:46 UTC

    Do you know how to write IDEA plugin in language other than Java?

      Do you know how to write IDEA plugin in language other than Java?

      Nope. But you don't have to write all the https://github.com/hurricup/Perl5-IDEA/blob/master/src/com/perl5/lang/perl/lexer/Perl.flex stuff in java.

      Your plugin could call "perl lexmyperlfile.pl" via Runtime.getRuntime().exec() or some such

      Or if that is too slow, open a socket and launch "perl threrealplugin.pl" so they can talk on this socket

      Instead of doing all the hard work yourself, let CPAN work for you

      somehow or something ... its just ideas :)

        I've investigated possibility to use PPI. I'm lazy as every proper programmer. But it doesn't worked. IDEA lexer should be able to re-lex from random position and re-lexing code many times on each change. With PPI I'll be limited with it's functionality and, for example, can't implement new features, like annotations :)

        Well, it was possible, but with almost same amount of work and additional restrictions.