Camelcade / Perl5-IDEA

Perl5 plugins for IntelliJ IDEA
https://plugins.jetbrains.com/plugin/7796-perl/
Other
407 stars 76 forks source link

Implement exporter tags support #386

Open hurricup opened 9 years ago

johndaviddunlap commented 7 years ago

This would be a very nice feature to have. In our application, we have a Util module which contains a lot of helper functions which we import into all of our other modules. For example,

In Util module

use vars qw(@EXPORT_OK);
use Exporter qw(import);
@EXPORT_OK = qw(
    is_uuid
    assert_uuid
    assert_numeric
);

In some other module

use Lariat::V4::Util qw(
    is_uuid
    assert_uuid
    assert_numeric
);

Currently, what we see in the IDE is as follows: selection_001

hurricup commented 7 years ago

This is not about tags and this should work already. @EXPORT and @EXPORT_OK already supported. This issue is about @EXPORT_TAGS

johndaviddunlap commented 7 years ago

My apologies, I followed the link on #1560. I must have misunderstood the issue.

morehockeystats commented 5 years ago

ping?.. This and the support for indirect reference, e.g.

my @arr = qw/sub1 sub2/; @EXPORTER = @arr;

are dearly missed for me.

morehockeystats commented 5 years ago

Maybe when the variable, or a sub is explicitly imported, such as

use Module qw($VAR);

and later

print $VAR, "\n";

it can pick the resolution from the usage statement.

hurricup commented 5 years ago

It does, if plugin understands, how export been done. See Carp for example. If some tricky export been used, it requires additional efforts from my side to make it work

morehockeystats commented 2 years ago

Did you have a chance to work on this one?

targzeta commented 2 years ago

+1

It should be nice to resolve the "Unable to find sub definition" when importing a tag.

Emanuele