in reply to
disable functions if module not installed
You might also want to use a block eval instead of a string eval. Block eval is for exception handling, string eval is for on-the-fly complilation.
If you're trying to debug this while running it as a CGI, you should serously look into CGI::Carp with particular attention to fatalstobrowser. Or you could do one better and debug it at a command line. It's a much better idea to make sure it compiles at a command line and then upload it to your web server.