I want to do this:
my $object = Foo->new();
Only I want to replace 'Foo' with a variable determined by some other factor.
my $module_name = 'Foo';
my $object = $module_name->new();
I got as far as understanding that use will never be happy with this, is that right? And I ought to use require instead?
My code doesn't give an error if I do this:
$module = 'Foo';
my $module_path = $module . '.pm';
But it complains that I'm calling "new" on an unblessed reference when I do my $object = $module->new(); on the next line.