use Safe; $s = new Safe; $s->deny_only(q(:dangerous)); $s->reval(q(use Data::Dumper;)); die $@ if $@; #### Possible unintended interpolation of @INC in string at /usr/lib/perl/5.10/DynaLoader.pm line 92. Can't load module Data::Dumper, dynamic loading not available in this perl. (You may need to build a new perl executable which either supports dynamic loading or has the Data::Dumper module statically linked into it.) at (eval 2) line 1 Compilation failed in require at (eval 2) line 1. BEGIN failed--compilation aborted at (eval 2) line 1.