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

Pre-RFC "use builtin" full import

Thread Next
September 21, 2022 03:56
Pre-RFC "use builtin" full import
Message ID:
Hi Porters,

I really enjoy using several of the builtin functions. However, to avoid
having to prepend everything with "builtin::X" I need to type them
individually in the program/function header, which is making me copy/paste
boilerplate code around.

So instead of having to add:

no warnings 'experimental::builtin';
use builtin qw( true false is_bool weaken blessed refaddr reftype ceil
floor trim );

I wish I could just type:

no warnings 'experimental::builtin';
use builtin;

and that would mean: lexically import all builtin function names. Another
alternative would be:

use builtin ':all';

but, in the context of "builtin", where all functions are always available
and "use builtin" is only required to remove said namespace, the latter
makes little sense to me and I much rather use the former.

What do you think?


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