develooper Front page | perl.perl5.porters | Postings from October 2016

Re: [perl #129981] EXPORT_TAGS no longer immune to once warnings

Thread Previous | Thread Next
Sawyer X
October 30, 2016 11:47
Re: [perl #129981] EXPORT_TAGS no longer immune to once warnings
Message ID:

On 10/29/2016 07:47 PM, demerphq wrote:
> On 29 October 2016 at 16:30, Father Chrysostomos via RT
> <> wrote:
>> On Thu Oct 27 23:58:15 2016, demerphq wrote:
>>> Yes. I did.
>>> commit 055ae706a0637a77ba440aedf596d2ebac642051
>>> Author: Yves Orton <>
>>> Date:   Thu Oct 27 15:36:27 2016 +0200
>>>     must check all the EXPORT vars in two places!
>>>     (Silence lots of used once warnings we used to not generate)
>> Your original commit message said:
>>> Another issue is that some of the code was inadverdantly
>>> doing prefix matches, and not exact matchs for certain
>>> magic var names. This is fixed as part of these changes.
>> I do not think it was inadvertent.  I believe there are other EXPORT_* variables also used, but is down right now.
>> In any case, I think there *should* be a prefix match for EXPORT*.
> We don't document such an exemption. And when in place it means that
> if people typo and EXPORT related var name then there are no warnings.
> Eg, these should trigger used only once warnings:
> @EXPORT_oK= qw( ... );
> @EXPORTOK= qw();
> @EXPORT__OK=qw();
> But without my patch none of them will. I am fine if we add more
> specific var names, but I really think we should have to enumerate
> them, especially as they should be documented in PERLVAR too.

I don't think we should have a pattern of ^EXPORT_, but specify the
specific variables allowed. Typos are just one reason, but forced future
compatibility due to existing usage is another. We should support what
we know and know what we support.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About