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

Re: module loading built-in

Thread Previous | Thread Next
From:
Aaron Priven
Date:
September 19, 2022 16:35
Subject:
Re: module loading built-in
Message ID:
B8BB9882-CC76-4FFB-9C55-B493C1B2533D@priven.com
I wonder if it wouldn’t be more flexible to have

module_file_of (‘Foo::Bar’);

and then allow that to be loaded into require or used for any other desired purpose, rather than having a special “load” routine.

e.g.,

	my $x = module_name_of('Foo::Bar');
	require $x;

would be equivalent to

	require Foo::Bar;



Or, maybe not.

To be honest, I’m not sure to what other purposes this function could be put, but it strikes me as the wrong thing to have some kind of data munging that can only be accessed through a separate function (as though we only had printf and not sprintf).

-- 
Aaron Priven, aaron@priven.com, www.priven.com/aaron


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