Re: mod_perl and utf8 and CGI->param

2017-06-01 Thread Peng Yonghua
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

Re: mod_perl and utf8 and CGI->param

2017-06-01 Thread Peng Yonghua
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

Re: mod_perl and utf8 and CGI->param

2017-06-01 Thread Randal L. Schwartz
> "Randal" == Randal L Schwartz writes: Randal> Getting really frustrated with mod_perl2's apparent inability to Randal> probably read UTF8 input. Randal> Here's my mod_perl2 setup: Randal> Apache 2.2.[something] Randal> mod_perl 2.0.7 (or nearly that) Randal> ModPerl::Registry Randal

Re: capture exception

2017-06-01 Thread Peng Yonghua
Thanks for everyone's reply. I got the idea from https://stackoverflow.com/questions/4006267/what-is-the-best-way-to-handle-exceptions-in-perl , The consensus of the Perl community seems to be thatTry::Tiny is the preferred way of doing exception ha