And, can I override any method from a class via this way? is this a
general trick? thanks.
On 2017/6/2 8:48, Peng Yonghua wrote:
good patch. thanks for sharing.
On 2017/6/1 23:34, Randal L. Schwartz wrote:
I realized that I never posted my ultimate solution. I monkey patch
CGI.pm:
require CGI;
{
my $orig = \&CGI::param;
no warnings 'redefine';
*CGI::param = sub {
$CGI::LIST_CONTEXT_WARN = 0; # workaround for backward compatibility
$CGI::PARAM_UTF8 = 1;
goto &$orig;
};
}
And this has been working just fine for both CGI and mod_perl. Just
for the
record.