sub do_stuff { ### some stuff eval "use Foo::Bar::Baz;"; die if $@; ## do stuff with the imported functions }