develooper Front page | perl.perl5.porters | Postings from June 2022

Re: Pre-RFC: A built-in ability for lexical import/export

Thread Previous | Thread Next
From:
Martijn Lievaart
Date:
June 27, 2022 17:47
Subject:
Re: Pre-RFC: A built-in ability for lexical import/export
Message ID:
56f9914a-b1c4-1824-44ba-e16430f09f43@rtij.nl

Op 27-06-2022 om 15:40 schreef Paul "LeoNerd" Evans:
> On Fri, 24 Jun 2022 16:44:27 +0100
> "Paul \"LeoNerd\" Evans" <leonerd@leonerd.org.uk> wrote:
>
>> I was thinking that maybe it should be just exposed as a builtin::
>> function itself, perhaps as
>>
>>    builtin::lexically_export $name, \&func;
> I've had a bit of a go at implementing this:
>
>    https://github.com/leonerd/perl5/tree/lexically-export
>
>> Perhaps it should take a whole kv-list of name/ref pairs, so you can
>> export lots in one go:
>>
>>    builtin::lexically_export
>>      one => \&one,
>>      two => \&two, ...
> It currently doesn't do this yet, but shouldn't be hard to add.
>

What I do not understand is why one would want to use a different 
external name than the internal name? Exporter doesn't work like this 
and I for one, never felt the need to export under a different name.


TIA,

M4



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About