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 20:48
Subject:
Re: Pre-RFC: A built-in ability for lexical import/export
Message ID:
b70d958a-71d8-d985-0ad9-90447d771e27@rtij.nl
Op 27-06-2022 om 21:45 schreef Paul "LeoNerd" Evans:
> On Mon, 27 Jun 2022 19:46:54 +0200
> Martijn Lievaart <m@rtij.nl> wrote:
>
>> 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.
> I'm not sure I follow the question...
>

If I understand the proposal correctly, you could do:

	builtin::lexically_export two => \&one;

	builtin::lexically_export three => \&two;


Why not implement:

	builtin::lexically_export '\&one';

And have that export the sub one() under the name 'one'?


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