Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: CGI.pm not good practice, so what is good, modern, practice for reading CGI paramters?

by vincent_veyron (Sexton)
on May 25, 2021 at 14:51 UTC ( #11133016=note: print w/replies, xml ) Need Help??


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

  • Comment on Re: CGI.pm not good practice, so what is good, modern, practice for reading CGI paramters?
  • Download Code

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11133016]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2022-01-24 06:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (64 votes). Check out past polls.

    Notices?