perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peng Yonghua <...@vodafonemail.de>
Subject Re: mod_perl and utf8 and CGI->param
Date Fri, 02 Jun 2017 00:48:41 GMT
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.

Mime
View raw message