http://qs1969.pair.com?node_id=11133016


in reply to CGI.pm not good practice, so what is good, modern, practice for reading CGI paramters?

With Apache, you can use Apache2::Request (https://metacpan.org/pod/Apache2::Request); in a mod_perl module, it works like in cgi.pm:

package xxxxxxxx; use strict ; use warnings ; use utf8 ; use Apache2::Const -compile => qw( OK REDIRECT ) ; sub handler { binmode(STDOUT, ":utf8") ; my $r = shift ; my $req = Apache2::Request->new( $r ) ; #récupérer les arguments my (%args, @args) ; #recherche des paramètres de la requête @args = $req->param ; for ( @args ) { $args{ $_ } = Encode::decode_utf8( $req->param($_) ) ; } [.....] }

https://compta.libremen.com

Logiciel libre de comptabilité générale en partie double

Replies are listed 'Best First'.
Re^2: CGI.pm not good practice, so what is good, modern, practice for reading CGI paramters?
by Anonymous Monk on May 26, 2021 at 08:31 UTC
    No, stick with CGI.pm for your cgis even on apache, even with mod_perl, read the porting guidelines