Perl5-IDEA icon indicating copy to clipboard operation
Perl5-IDEA copied to clipboard

Implement exporter tags support

Open hurricup opened this issue 10 years ago • 8 comments

hurricup avatar Aug 27 '15 18:08 hurricup

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

johndaviddunlap avatar Oct 10 '17 21:10 johndaviddunlap

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

hurricup avatar Oct 11 '17 04:10 hurricup

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

johndaviddunlap avatar Oct 11 '17 14:10 johndaviddunlap

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

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

are dearly missed for me.

morehockeystats avatar Jun 26 '19 21:06 morehockeystats

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.

morehockeystats avatar Jul 01 '19 00:07 morehockeystats

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

hurricup avatar Jul 01 '19 04:07 hurricup

Did you have a chance to work on this one?

morehockeystats avatar Jun 26 '22 23:06 morehockeystats

+1

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

Emanuele

targzeta avatar Jul 13 '22 22:07 targzeta