in reply to Re: Thorny design problem
in thread Thorny design problem
But if you try this:But you could do:The require function will look for the "Foo::Bar" file in the @INC array and will complain about not finding "Foo::Bar" there. In this case you can do:$class = ’Foo::Bar’; require $class; # $class is not a bareword #or require "Foo::Bar"; # not a bareword because of the ""eval "require $class";
my $module = 'Crunch/' . $company .'.pm'; require $module;
|
|---|