Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: •Re: Interesting CGI.pm query_string behavior

by mfriedman (Monk)
on Aug 13, 2002 at 19:10 UTC ( #189921=note: print w/replies, xml ) Need Help??


in reply to Re: •Re: Interesting CGI.pm query_string behavior
in thread Interesting CGI.pm query_string behavior

Indeed. It even becomes clearer when we look at the CGI.pm code. :)

#### Method: query_string # Synthesize a query string from our current # parameters #### 'query_string' => <<'END_OF_FUNC', sub query_string { my($self) = self_or_default(@_); my($param,$value,@pairs); foreach $param ($self->param) { my($eparam) = escape($param); foreach $value ($self->param($param)) { $value = escape($value); push(@pairs,"$eparam=$value"); } } return join($USE_PARAM_SEMICOLONS ? ';' : '&',@pairs); }

- from CGI.pm

So it simply constructs a query string from the given name/value pairs already in the CGI object. It'll even use that far-out semicolon format if you want it to. :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2021-06-12 14:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (53 votes). Check out past polls.

    Notices?