in reply to Re: How do I dynamically declare a package name for
in thread How do I dynamically declare a package name for

The caveat here is that since you're not giving require a bareword, you don't get the benefit of the filename niceties it would give you; in other words, you can't use $module = "Foo::Bar" and have require do the right thing (unless the right thing is to load a file called, literally, 'Foo::Bar').

It's been my experience that people don't really expect that, and sometimes miss the fact that the error message says "Can't find Foo::Bar in @INC..." instead of "Can't find Foo/Bar.pm in @INC..."

hdp.