in reply to Re: Re: using Carp & CGI::Carp?
in thread using Carp & CGI::Carp?
The indirect object syntax in the import call trips my paranoid-o-meter. If this is appropriately near the beginning of the program, you're probably okay, but it's fraught with enough peril (or, I can never remember all of the rules when it is and isn't okay) that I'd rather write:
BEGIN { my @symbols = qw( carp confess cluck croak fatalsToBrowser ); if ($ENV{MOD_PERL}) { require CGI::Carp; CGI::Carp->import( @symbols, 'fatalsToBrowser' ); } else { require Carp; Carp->import( @symbols ); } }
|
|---|