In one of the side projects I worked on, I created classes at run time (based on configs).

The way it works is that you can add code or even an object to @INC and require will work with it. So you end up having a class loader object (to borrow Java terminology) using Moose that would on the fly create a class based on whatever is being passed in.

In that project (kind of proof of concept of what I described), I take a standard document (that describes standardized objects in a system), translate the document into JSON using another Perl library and then read that JSON to know what each object is supposed to look like (it's type, attributes, etc.).

You should probably run the list of module names through some kind of sanitization process, especially if there's even a chance that list of modules could be defined by a 3rd party, otherwise, if somebody provides a module name like "strict;system(q[rm -rf /])", well, you've just gotten yourself a user specified arbitrary code execution.

That's the sort of logic that dictates Chinese is unreadable. Just because you can't read it, doesn't make it unreadable.

Many people can and do read it just fine, some people to the extent they'd rather read the source than the attached documentation, and some to the extent that some libraries lacking documentation entirely is not an issue, because reading the source makes the mechanics self-evident.