if (eval { require $method }) { $method =~ s/^functions\/(.*)\.pm$/$1/; eval "import functions::${method}"; die $@ if $@; # added this, which gave me the error message i needed...