in reply to Re^4: CGI::Application - Which is the proper way of handling and outputting utf8
in thread CGI::Application - Which is the proper way of handling and outputting utf8

I think, with the current version of CGI.pm, you could get the -no_xhtml pragma into CGI.pm by putting this into your application module. (It overrides the cgiapp_get_query method in the CGI::Application parent.)

sub cgiapp_get_query { my $self = shift; use CGI ('-no_xhmtml'); my $q = CGI->new; return $q; }

The current version of CGI.pm doesn't use that particular pragma, but the code would work if some other pragma were desired, such as -utf8.

Replies are listed 'Best First'.
Re^6: CGI::Application - Which is the proper way of handling and outputting utf8
by Anonymous Monk on Oct 30, 2020 at 00:12 UTC
    No. Make a subclass.

      Why?

      And a code example of such a subclass, please.