
srhadden
Novice
Mar 6, 2012, 2:25 PM
Post #1 of 5
(1494 views)
|
Trying to do conditional use statements
|
Can't Post
|
|
I'm working on some CGI, and I want to have a site-wide debug on/off. I thought about using the really nice module CGI::Carp because it will output errors to the web site and I don't have to look in the apache logs. Anyway, I wanted to only include the module if a variable is set. But I am having a basic problem. This does't seem to work. I think there is a problem with passing options to the module. eval "use CGI::Carp \"fatalsToBrowser\""; rint "test"; #intention syntax error If it is working properly, the perl code will generate an html page with the syntax error. But it doesn't. Is there a way to test if a module is loaded and then pass an argument to it? That was a workaround idea I had.
|