in reply to Re: Indirect variable expansion
in thread Indirect variable expansion

This removes code injection[1] while simplifying the interface[2]:

perl -e'use if 1, $ARGV[0]; print $ARGV[0]->VERSION' JSON::PP

  1. Well, we're still allowing the user to load and execute a module, but it handles bad module names much better.
  2. The input is specified once, and it avoids some traps.