in reply to best way to handle Subroutine redefined warning

Try SelfLoader. It's simple, fast, and it works.
#!/usr/bin/perl -T use SelfLoader; use CGI qw/:standard/; use CGI::Carp 'fatalsToBrowser'; use DBI; use strict; use warnings; print "Content-Type:text/html\n\n"; print "this is a test\n"; __DATA__ sub redirect { # code for redirect will go here } exit 1;

Replies are listed 'Best First'.
Re^2: best way to handle Subroutine redefined warning
by chromatic (Archbishop) on Feb 25, 2011 at 08:15 UTC

    How does that solve the problem?

      If you don't want the redirect that's in CGI.pm, just don't import it. change
      use CGI qw/:standard/;
      to
      use CGI qw/:standard !redirect/;