in reply to best way to handle Subroutine redefined warning
You could wrap your routine in no warnings 'redefine' (which is lexically scoped):
... { no warnings 'redefine'; sub redirect { # code for redirect will go here } } # CGI's redirect() can then still be used fully qualified: # print CGI::redirect('http://somewhere.else/');
Alternatively, don't import ":standard" functions from CGI module (which is what imports a redirect function (among many others) into your namespace), and use its OO interface instead.
|
|---|