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
Martijn Lievaart
June 27, 2022 17:47
Re: Pre-RFC: A built-in ability for lexical import/export
Message ID:

Op 27-06-2022 om 15:40 schreef Paul "LeoNerd" Evans:
> On Fri, 24 Jun 2022 16:44:27 +0100
> "Paul \"LeoNerd\" Evans" <> 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:
>> 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.



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