in reply to Re^2: Loading Modules At Run-Time With Interpolation
in thread Loading Modules At Run-Time With Interpolation

You are misdiagnosing the problem. The problem isn't the require. It's where you try to use the details function. For example, both of these will work:

my $p = 'Foo::Bar'; eval "require $p"; print $p->details->{name}; # ... and ... my $p = 'Bar'; eval "require Foo::$p"; print "Foo::$p"->details->{name};
By merging Foo:: directly into your submodules list, we don't need to constantly recreate the full package name each time - it's already created.

Replies are listed 'Best First'.
Re^4: Loading Modules At Run-Time With Interpolation
by Cody Pendant (Prior) on Aug 12, 2005 at 05:01 UTC
    Oh dear. I feel so dumb now. Thank you. It's working perfectly now.


    ($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
    =~y~b-v~a-z~s; print