in reply to Re^2: requiring pm modules
in thread requiring pm modules

If you really need to use a symbolic ref, you're probably better off doing something like:
use strict; .. no strict 'refs'; $x = 'getValue'; &$x(); use strict 'refs';
No need to turn off strict refs for the rest of your program.

Replies are listed 'Best First'.
Re^4: requiring pm modules
by revdiablo (Prior) on Nov 03, 2004 at 23:11 UTC

    You could also use a bare block, so you don't have to remember to turn strict refs back on:

    use strict; ... { no strict 'refs'; $x = 'getValue'; &$x(); } # now we're back to strict refs

    But, personally, I would rather use can, as I explained in Re^4: requiring pm modules.