http://www.perlmonks.org?node_id=40278

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: (object-oriented programming)

I'm trying to build a wrapper class to hold one of an arbitrary number of "plug-in" modules. My motive here is to load the module, and then pass calls from the outside world to that module, failing gracefully if it can't perform the function. I get the name of the module out of a database query. I can do require $string no problem, but the issue then becomes how do I say $string->new?

Originally posted as a Categorized Question.