Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: lighter alternative to

by Vennis (Pilgrim)
on Aug 30, 2002 at 09:09 UTC ( #194032=note: print w/replies, xml ) Need Help??

in reply to lighter alternative to

I personnally wouldn't use the next code and strongly advice to create a better running server...

But, FYI, you can parse the parameters manually. Depending on the complexity, you could use this.

If you use this 'wannahave a Big Ball of Mud solution' (i love that name) make sure you check the parameters for security problems.

my $input; if ($ENV{REQUEST_METHOD} eq 'GET'){ $input = $ENV{QUERY_STRING}; } else { read(STDIN,$input,$ENV{CONTENT_LENGTH}); } foreach( split(/&/,$input)){ $_ =~ tr/+/ /; my ($name,$value) = split(/=/,$_,2); $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; if($param{$name}) { $param{$name}.= ",$value"; } else { $param{$name} = $value; } print "Found $name = $value\n"; }

Replies are listed 'Best First'.
Re: Re: lighter alternative to
by perrin (Chancellor) on Aug 30, 2002 at 12:54 UTC
    There's really no need to resort to that. Using a properly coded module does not add significant overhead. Replacing CGI with CGI_Lite turned out to improve overall performance of the script by 60%.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2022-11-29 02:22 GMT
Find Nodes?
    Voting Booth?