X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCGI.pm;h=a81ac079098d69c106594a8f07e8d7c8bb5795fb;hb=3cb6de8118f279c0dca172ac40ef21e89cf524b7;hp=a51859827ad1c8aa1d4523a66b025f9e13cdc6db;hpb=eaf840779373130f95f7bd459b3864c78c698e28;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/CGI.pm b/lib/CGI.pm index a518598..a81ac07 100644 --- a/lib/CGI.pm +++ b/lib/CGI.pm @@ -3830,7 +3830,7 @@ a short example of creating multiple session records: The file format used for save/restore is identical to that used by the Whitehead Genome Center's data exchange format "Boulderio", and can be manipulated and even databased using Boulderio utilities. See - + http://stein.cshl.org/boulder/ for further details. @@ -4069,7 +4069,7 @@ input, this should work: use CGI qw(-no_debug :standard); restore_parameters(join('&',@ARGV)); - + See the section on debugging for more details. =item -private_tempfiles @@ -4616,7 +4616,7 @@ and values of the associative array become the HTML tag's attributes: "Open a new frame"); Open a new frame - + You may dispense with the dashes in front of the attribute names if you prefer: @@ -4634,7 +4634,7 @@ Prior to CGI.pm version 2.41, providing an empty ('') string as an attribute argument was the same as providing undef. However, this has changed in order to accommodate those who want to create tags of the form . The difference is shown in these two pieces of code: - + CODE RESULT img({alt=>undef}) img({alt=>''}) @@ -4768,7 +4768,7 @@ autoEscape() method with a false value immediately after creating the CGI object $query = new CGI; $query->autoEscape(undef); - + =head2 CREATING AN ISINDEX TAG @@ -4798,7 +4798,7 @@ default is to process the query with the current script. startform() will return a
tag with the optional method, action and form encoding that you specify. The defaults are: - + method: POST action: this script enctype: application/x-www-form-urlencoded @@ -5242,7 +5242,7 @@ handlers are called. print $query->checkbox_group(-name=>'group_name', -values=>['eenie','meenie','minie','moe'], -rows=2,-columns=>2); - + checkbox_group() creates a list of checkboxes that are related by the same name. @@ -5780,7 +5780,7 @@ documentation in Netscape's home pages for details =item 2. Specify the destination for the document in the HTTP header You may provide a B<-target> parameter to the header() method: - + print $q->header(-target=>'ResultsWindow'); This will tell the browser to load the output of your script into the @@ -5917,7 +5917,7 @@ name/value pairs formatted nicely as a nested list. This is useful for debugging purposes: print $query->dump - + Produces something that looks like: @@ -6162,7 +6162,7 @@ a second, and begins again. =over 4 =item multipart_init() - + multipart_init(-boundary=>$boundary); Initialize the multipart system. The -boundary argument specifies @@ -6379,9 +6379,9 @@ for suggestions and bug fixes. #!/usr/local/bin/perl - + use CGI; - + $query = new CGI; print $query->header; @@ -6391,35 +6391,35 @@ for suggestions and bug fixes. &do_work($query); &print_tail; print $query->end_html; - + sub print_prompt { my($query) = @_; - + print $query->startform; print "What's your name?
"; print $query->textfield('name'); print $query->checkbox('Not my real name'); - + print "

Where can you find English Sparrows?
"; print $query->checkbox_group( -name=>'Sparrow locations', -values=>[England,France,Spain,Asia,Hoboken], -linebreak=>'yes', -defaults=>[England,Asia]); - + print "

How far can they fly?
", $query->radio_group( -name=>'how far', -values=>['10 ft','1 mile','10 miles','real far'], -default=>'1 mile'); - + print "

What's your favorite color? "; print $query->popup_menu(-name=>'Color', -values=>['black','brown','red','yellow'], -default=>'red'); - + print $query->hidden('Reference','Monty Python and the Holy Grail'); - + print "

What have you got there?
"; print $query->scrolling_list( -name=>'possessions', @@ -6427,19 +6427,19 @@ for suggestions and bug fixes. 'A Sword','A Ticket'], -size=>5, -multiple=>'true'); - + print "

Any parting comments?
"; print $query->textarea(-name=>'Comments', -rows=>10, -columns=>50); - + print "

",$query->reset; print $query->submit('Action','Shout'); print $query->submit('Action','Scream'); print $query->endform; print "


\n"; } - + sub do_work { my($query) = @_; my(@values,$key); @@ -6452,7 +6452,7 @@ for suggestions and bug fixes. print join(", ",@values),"
\n"; } } - + sub print_tail { print <