On Dec 20, 2007 2:19 PM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote:
> Octavian Rasnita wrote:
> > and I want to be able to choose the wanted module at runtime
snip
> Assuming that the path to the directory right above Questionnaire is
> included in @INC, this should work:
>
>      require "Questionnaire/$module.pm";
>      my $obj = "Questionnaire::$module"->new;
snip

It is important to note that require does not call the module's import
function, so you will need to call it yourself (if it has one).

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to