On Sun, Dec 4, 2016 at 11:15 PM, Ricardo Signes <perl.p5p@rjbs.manxome.org> wrote: > * Sawyer X <xsawyerx@gmail.com> [2016-12-04T11:55:02] > > It has been suggested several times to ship Module::Runtime in core. I > > have considered it and discussed it with Zefram a little bit yesterday. > > Can we get a brief rundown of why Module::Runtime is superior to > Module::Load, > which is already core? I've heard it said that it is, and I have no > reason to > doubt it, but I don't know the reasons. Module::Load's interface is rather more heuristic than desirable. If your input doesn't look like it could be a module (/[^\w:'/), it will require it as a filename, if not it will try to convert it to a filename, first trying with ".pm" appended and then without (resulting in a rather characteristic double error). In the latter case if given arguments (or called as autoload) it will also run the associated import method. These are many different behaviors, that should really have different names (e.g. load_file and load_module), and TBH some of those behaviors probably shouldn't exist. Module::Load is the sort of tool that will usually work, but can sometimes magically do something confusing. LeonThread Previous | Thread Next