eval "use Foo::Bar"; if ($@) { warn "Eval failed: $@"; }