BEGIN { use CGI; $query = new CGI; $user = $query->cookie('acct'); if ($user eq "foobar") { use CGI::Carp qw(fatalsToBrowser); # ALWAYS IMPORTS } }
The problem is that perl sees the fatalsToBrowser line and imports the function, regardless of the if statement. I can't seem to conditionally choose to import the function.
ideas?
In reply to "Safe" ways for Carp to report errors to browser? by argv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |