php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /opt/lampp/share/man/man3/ |
files >> //opt/lampp/share/man/man3/HTML::Form.3 |
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.20) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "HTML::Form 3" .TH HTML::Form 3 "2005-12-07" "perl v5.16.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" HTML::Form \- Class that represents an HTML form element .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& use HTML::Form; \& $form = HTML::Form\->parse($html, $base_uri); \& $form\->value(query => "Perl"); \& \& use LWP::UserAgent; \& $ua = LWP::UserAgent\->new; \& $response = $ua\->request($form\->click); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Objects of the \f(CW\*(C`HTML::Form\*(C'\fR class represents a single \s-1HTML\s0 \&\f(CW\*(C`<form> ... </form>\*(C'\fR instance. A form consists of a sequence of inputs that usually have names, and which can take on various values. The state of a form can be tweaked and it can then be asked to provide \f(CW\*(C`HTTP::Request\*(C'\fR objects that can be passed to the \&\fIrequest()\fR method of \f(CW\*(C`LWP::UserAgent\*(C'\fR. .PP The following methods are available: .ie n .IP "@forms = HTML::Form\->parse( $response )" 4 .el .IP "\f(CW@forms\fR = HTML::Form\->parse( \f(CW$response\fR )" 4 .IX Item "@forms = HTML::Form->parse( $response )" .PD 0 .ie n .IP "@forms = HTML::Form\->parse( $html_document, $base )" 4 .el .IP "\f(CW@forms\fR = HTML::Form\->parse( \f(CW$html_document\fR, \f(CW$base\fR )" 4 .IX Item "@forms = HTML::Form->parse( $html_document, $base )" .ie n .IP "@forms = HTML::Form\->parse( $html_document, %opt )" 4 .el .IP "\f(CW@forms\fR = HTML::Form\->parse( \f(CW$html_document\fR, \f(CW%opt\fR )" 4 .IX Item "@forms = HTML::Form->parse( $html_document, %opt )" .PD The \fIparse()\fR class method will parse an \s-1HTML\s0 document and build up \&\f(CW\*(C`HTML::Form\*(C'\fR objects for each <form> element found. If called in scalar context only returns the first <form>. Returns an empty list if there are no forms to be found. .Sp The \f(CW$base\fR is the \s-1URI\s0 used to retrieve the \f(CW$html_document\fR. It is needed to resolve relative action URIs. If the document was retrieved with \s-1LWP\s0 then this this parameter is obtained from the \&\f(CW$response\fR\->\fIbase()\fR method, as shown by the following example: .Sp .Vb 4 \& my $ua = LWP::UserAgent\->new; \& my $response = $ua\->get("http://www.example.com/form.html"); \& my @forms = HTML::Form\->parse($response\->decoded_content, \& $response\->base); .Ve .Sp The \fIparse()\fR method can parse from an \f(CW\*(C`HTTP::Response\*(C'\fR object directly, so the example above can be more conveniently written as: .Sp .Vb 3 \& my $ua = LWP::UserAgent\->new; \& my $response = $ua\->get("http://www.example.com/form.html"); \& my @forms = HTML::Form\->parse($response); .Ve .Sp Note that any object that implements a \fIdecoded_content()\fR and \fIbase()\fR method with similar behaviour as \f(CW\*(C`HTTP::Response\*(C'\fR will do. .Sp Finally options might be passed in to control how the parse method behaves. The following options are currently recognized: .RS 4 .ie n .IP """base""" 4 .el .IP "\f(CWbase\fR" 4 .IX Item "base" Another way to provide the base \s-1URI\s0. .ie n .IP """verbose""" 4 .el .IP "\f(CWverbose\fR" 4 .IX Item "verbose" Print messages to \s-1STDERR\s0 about any bad \s-1HTML\s0 form constructs found. .RE .RS 4 .RE .ie n .IP "$method = $form\->method" 4 .el .IP "\f(CW$method\fR = \f(CW$form\fR\->method" 4 .IX Item "$method = $form->method" .PD 0 .ie n .IP "$form\->method( $new_method )" 4 .el .IP "\f(CW$form\fR\->method( \f(CW$new_method\fR )" 4 .IX Item "$form->method( $new_method )" .PD This method is gets/sets the \fImethod\fR name used for the \&\f(CW\*(C`HTTP::Request\*(C'\fR generated. It is a string like \*(L"\s-1GET\s0\*(R" or \*(L"\s-1POST\s0\*(R". .ie n .IP "$action = $form\->action" 4 .el .IP "\f(CW$action\fR = \f(CW$form\fR\->action" 4 .IX Item "$action = $form->action" .PD 0 .ie n .IP "$form\->action( $new_action )" 4 .el .IP "\f(CW$form\fR\->action( \f(CW$new_action\fR )" 4 .IX Item "$form->action( $new_action )" .PD This method gets/sets the \s-1URI\s0 which we want to apply the request \&\fImethod\fR to. .ie n .IP "$enctype = $form\->enctype" 4 .el .IP "\f(CW$enctype\fR = \f(CW$form\fR\->enctype" 4 .IX Item "$enctype = $form->enctype" .PD 0 .ie n .IP "$form\->enctype( $new_enctype )" 4 .el .IP "\f(CW$form\fR\->enctype( \f(CW$new_enctype\fR )" 4 .IX Item "$form->enctype( $new_enctype )" .PD This method gets/sets the encoding type for the form data. It is a string like \*(L"application/x\-www\-form\-urlencoded\*(R" or \*(L"multipart/form\-data\*(R". .ie n .IP "$value = $form\->attr( $name )" 4 .el .IP "\f(CW$value\fR = \f(CW$form\fR\->attr( \f(CW$name\fR )" 4 .IX Item "$value = $form->attr( $name )" .PD 0 .ie n .IP "$form\->attr( $name, $new_value )" 4 .el .IP "\f(CW$form\fR\->attr( \f(CW$name\fR, \f(CW$new_value\fR )" 4 .IX Item "$form->attr( $name, $new_value )" .PD This method give access to the original \s-1HTML\s0 attributes of the <form> tag. The \f(CW$name\fR should always be passed in lower case. .Sp Example: .Sp .Vb 4 \& @f = HTML::Form\->parse( $html, $foo ); \& @f = grep $_\->attr("id") eq "foo", @f; \& die "No form named \*(Aqfoo\*(Aq found" unless @f; \& $foo = shift @f; .Ve .ie n .IP "@inputs = $form\->inputs" 4 .el .IP "\f(CW@inputs\fR = \f(CW$form\fR\->inputs" 4 .IX Item "@inputs = $form->inputs" This method returns the list of inputs in the form. If called in scalar context it returns the number of inputs contained in the form. See \*(L"\s-1INPUTS\s0\*(R" for what methods are available for the input objects returned. .ie n .IP "$input = $form\->find_input( $name )" 4 .el .IP "\f(CW$input\fR = \f(CW$form\fR\->find_input( \f(CW$name\fR )" 4 .IX Item "$input = $form->find_input( $name )" .PD 0 .ie n .IP "$input = $form\->find_input( $name, $type )" 4 .el .IP "\f(CW$input\fR = \f(CW$form\fR\->find_input( \f(CW$name\fR, \f(CW$type\fR )" 4 .IX Item "$input = $form->find_input( $name, $type )" .ie n .IP "$input = $form\->find_input( $name, $type, $index )" 4 .el .IP "\f(CW$input\fR = \f(CW$form\fR\->find_input( \f(CW$name\fR, \f(CW$type\fR, \f(CW$index\fR )" 4 .IX Item "$input = $form->find_input( $name, $type, $index )" .PD This method is used to locate specific inputs within the form. All inputs that match the arguments given are returned. In scalar context only the first is returned, or \f(CW\*(C`undef\*(C'\fR if none match. .Sp If \f(CW$name\fR is specified, then the input must have the indicated name. .Sp If \f(CW$type\fR is specified, then the input must have the specified type. The following type names are used: \*(L"text\*(R", \*(L"password\*(R", \*(L"hidden\*(R", \&\*(L"textarea\*(R", \*(L"file\*(R", \*(L"image\*(R", \*(L"submit\*(R", \*(L"radio\*(R", \*(L"checkbox\*(R" and \*(L"option\*(R". .Sp The \f(CW$index\fR is the sequence number of the input matched where 1 is the first. If combined with \f(CW$name\fR and/or \f(CW$type\fR then it select the \fIn\fRth input with the given name and/or type. .ie n .IP "$value = $form\->value( $name )" 4 .el .IP "\f(CW$value\fR = \f(CW$form\fR\->value( \f(CW$name\fR )" 4 .IX Item "$value = $form->value( $name )" .PD 0 .ie n .IP "$form\->value( $name, $new_value )" 4 .el .IP "\f(CW$form\fR\->value( \f(CW$name\fR, \f(CW$new_value\fR )" 4 .IX Item "$form->value( $name, $new_value )" .PD The \fIvalue()\fR method can be used to get/set the value of some input. If no input has the indicated name, then this method will croak. .Sp If multiple inputs have the same name, only the first one will be affected. .Sp The call: .Sp .Vb 1 \& $form\->value(\*(Aqfoo\*(Aq) .Ve .Sp is a short-hand for: .Sp .Vb 1 \& $form\->find_input(\*(Aqfoo\*(Aq)\->value; .Ve .ie n .IP "@names = $form\->param" 4 .el .IP "\f(CW@names\fR = \f(CW$form\fR\->param" 4 .IX Item "@names = $form->param" .PD 0 .ie n .IP "@values = $form\->param( $name )" 4 .el .IP "\f(CW@values\fR = \f(CW$form\fR\->param( \f(CW$name\fR )" 4 .IX Item "@values = $form->param( $name )" .ie n .IP "$form\->param( $name, $value, ... )" 4 .el .IP "\f(CW$form\fR\->param( \f(CW$name\fR, \f(CW$value\fR, ... )" 4 .IX Item "$form->param( $name, $value, ... )" .ie n .IP "$form\->param( $name, \e@values )" 4 .el .IP "\f(CW$form\fR\->param( \f(CW$name\fR, \e@values )" 4 .IX Item "$form->param( $name, @values )" .PD Alternative interface to examining and setting the values of the form. .Sp If called without arguments then it returns the names of all the inputs in the form. The names will not repeat even if multiple inputs have the same name. In scalar context the number of different names is returned. .Sp If called with a single argument then it returns the value or values of inputs with the given name. If called in scalar context only the first value is returned. If no input exists with the given name, then \&\f(CW\*(C`undef\*(C'\fR is returned. .Sp If called with 2 or more arguments then it will set values of the named inputs. This form will croak if no inputs have the given name or if any of the values provided does not fit. Values can also be provided as a reference to an array. This form will allow unsetting all values with the given name as well. .Sp This interface resembles that of the \fIparam()\fR function of the \s-1CGI\s0 module. .ie n .IP "$form\->try_others( \e&callback )" 4 .el .IP "\f(CW$form\fR\->try_others( \e&callback )" 4 .IX Item "$form->try_others( &callback )" This method will iterate over all permutations of unvisited enumerated values (<select>, <radio>, <checkbox>) and invoke the callback for each. The callback is passed the \f(CW$form\fR as argument. The return value from the callback is ignored and the \fItry_others()\fR method itself does not return anything. .ie n .IP "$request = $form\->make_request" 4 .el .IP "\f(CW$request\fR = \f(CW$form\fR\->make_request" 4 .IX Item "$request = $form->make_request" Will return an \f(CW\*(C`HTTP::Request\*(C'\fR object that reflects the current setting of the form. You might want to use the \fIclick()\fR method instead. .ie n .IP "$request = $form\->click" 4 .el .IP "\f(CW$request\fR = \f(CW$form\fR\->click" 4 .IX Item "$request = $form->click" .PD 0 .ie n .IP "$request = $form\->click( $name )" 4 .el .IP "\f(CW$request\fR = \f(CW$form\fR\->click( \f(CW$name\fR )" 4 .IX Item "$request = $form->click( $name )" .ie n .IP "$request = $form\->click( $x, $y )" 4 .el .IP "\f(CW$request\fR = \f(CW$form\fR\->click( \f(CW$x\fR, \f(CW$y\fR )" 4 .IX Item "$request = $form->click( $x, $y )" .ie n .IP "$request = $form\->click( $name, $x, $y )" 4 .el .IP "\f(CW$request\fR = \f(CW$form\fR\->click( \f(CW$name\fR, \f(CW$x\fR, \f(CW$y\fR )" 4 .IX Item "$request = $form->click( $name, $x, $y )" .PD Will \*(L"click\*(R" on the first clickable input (which will be of type \&\f(CW\*(C`submit\*(C'\fR or \f(CW\*(C`image\*(C'\fR). The result of clicking is an \f(CW\*(C`HTTP::Request\*(C'\fR object that can then be passed to \f(CW\*(C`LWP::UserAgent\*(C'\fR if you want to obtain the server response. .Sp If a \f(CW$name\fR is specified, we will click on the first clickable input with the given name, and the method will croak if no clickable input with the given name is found. If \f(CW$name\fR is \fInot\fR specified, then it is ok if the form contains no clickable inputs. In this case the \&\fIclick()\fR method returns the same request as the \fImake_request()\fR method would do. .Sp If there are multiple clickable inputs with the same name, then there is no way to get the \fIclick()\fR method of the \f(CW\*(C`HTML::Form\*(C'\fR to click on any but the first. If you need this you would have to locate the input with \fIfind_input()\fR and invoke the \fIclick()\fR method on the given input yourself. .Sp A click coordinate pair can also be provided, but this only makes a difference if you clicked on an image. The default coordinate is (1,1). The upper-left corner of the image is (0,0), but some badly coded \s-1CGI\s0 scripts are known to not recognize this. Therefore (1,1) was selected as a safer default. .ie n .IP "@kw = $form\->form" 4 .el .IP "\f(CW@kw\fR = \f(CW$form\fR\->form" 4 .IX Item "@kw = $form->form" Returns the current setting as a sequence of key/value pairs. Note that keys might be repeated, which means that some values might be lost if the return values are assigned to a hash. .Sp In scalar context this method returns the number of key/value pairs generated. .ie n .IP "$form\->dump" 4 .el .IP "\f(CW$form\fR\->dump" 4 .IX Item "$form->dump" Returns a textual representation of current state of the form. Mainly useful for debugging. If called in void context, then the dump is printed on \s-1STDERR\s0. .SH "INPUTS" .IX Header "INPUTS" An \f(CW\*(C`HTML::Form\*(C'\fR objects contains a sequence of \fIinputs\fR. References to the inputs can be obtained with the \f(CW$form\fR\->inputs or \f(CW$form\fR\->find_input methods. .PP Note that there is \fInot\fR a one-to-one correspondence between input \&\fIobjects\fR and <input> \fIelements\fR in the \s-1HTML\s0 document. An input object basically represents a name/value pair, so when multiple \&\s-1HTML\s0 elements contribute to the same name/value pair in the submitted form they are combined. .PP The input elements that are mapped one-to-one are \*(L"text\*(R", \*(L"textarea\*(R", \&\*(L"password\*(R", \*(L"hidden\*(R", \*(L"file\*(R", \*(L"image\*(R", \*(L"submit\*(R" and \*(L"checkbox\*(R". For the \*(L"radio\*(R" and \*(L"option\*(R" inputs the story is not as simple: All <input type=\*(L"radio\*(R"> elements with the same name will contribute to the same input radio object. The number of radio input objects will be the same as the number of distinct names used for the <input type=\*(L"radio\*(R"> elements. For a <select> element without the \f(CW\*(C`multiple\*(C'\fR attribute there will be one input object of type of \*(L"option\*(R". For a <select multiple> element there will be one input object for each contained <option> element. Each one of these option objects will have the same name. .PP The following methods are available for the \fIinput\fR objects: .ie n .IP "$input\->type" 4 .el .IP "\f(CW$input\fR\->type" 4 .IX Item "$input->type" Returns the type of this input. The type is one of the following strings: \*(L"text\*(R", \*(L"password\*(R", \*(L"hidden\*(R", \*(L"textarea\*(R", \*(L"file\*(R", \*(L"image\*(R", \*(L"submit\*(R", \&\*(L"radio\*(R", \*(L"checkbox\*(R" or \*(L"option\*(R". .ie n .IP "$name = $input\->name" 4 .el .IP "\f(CW$name\fR = \f(CW$input\fR\->name" 4 .IX Item "$name = $input->name" .PD 0 .ie n .IP "$input\->name( $new_name )" 4 .el .IP "\f(CW$input\fR\->name( \f(CW$new_name\fR )" 4 .IX Item "$input->name( $new_name )" .PD This method can be used to get/set the current name of the input. .ie n .IP "$value = $input\->value" 4 .el .IP "\f(CW$value\fR = \f(CW$input\fR\->value" 4 .IX Item "$value = $input->value" .PD 0 .ie n .IP "$input\->value( $new_value )" 4 .el .IP "\f(CW$input\fR\->value( \f(CW$new_value\fR )" 4 .IX Item "$input->value( $new_value )" .PD This method can be used to get/set the current value of an input. .Sp If the input only can take an enumerated list of values, then it is an error to try to set it to something else and the method will croak if you try. .Sp You will also be able to set the value of read-only inputs, but a warning will be generated if running under \f(CW\*(C`perl \-w\*(C'\fR. .ie n .IP "$input\->possible_values" 4 .el .IP "\f(CW$input\fR\->possible_values" 4 .IX Item "$input->possible_values" Returns a list of all values that an input can take. For inputs that do not have discrete values, this returns an empty list. .ie n .IP "$input\->other_possible_values" 4 .el .IP "\f(CW$input\fR\->other_possible_values" 4 .IX Item "$input->other_possible_values" Returns a list of all values not tried yet. .ie n .IP "$input\->value_names" 4 .el .IP "\f(CW$input\fR\->value_names" 4 .IX Item "$input->value_names" For some inputs the values can have names that are different from the values themselves. The number of names returned by this method will match the number of values reported by \f(CW$input\fR\->possible_values. .Sp When setting values using the \fIvalue()\fR method it is also possible to use the value names in place of the value itself. .ie n .IP "$bool = $input\->readonly" 4 .el .IP "\f(CW$bool\fR = \f(CW$input\fR\->readonly" 4 .IX Item "$bool = $input->readonly" .PD 0 .ie n .IP "$input\->readonly( $bool )" 4 .el .IP "\f(CW$input\fR\->readonly( \f(CW$bool\fR )" 4 .IX Item "$input->readonly( $bool )" .PD This method is used to get/set the value of the readonly attribute. You are allowed to modify the value of readonly inputs, but setting the value will generate some noise when warnings are enabled. Hidden fields always start out readonly. .ie n .IP "$bool = $input\->disabled" 4 .el .IP "\f(CW$bool\fR = \f(CW$input\fR\->disabled" 4 .IX Item "$bool = $input->disabled" .PD 0 .ie n .IP "$input\->disabled( $bool )" 4 .el .IP "\f(CW$input\fR\->disabled( \f(CW$bool\fR )" 4 .IX Item "$input->disabled( $bool )" .PD This method is used to get/set the value of the disabled attribute. Disabled inputs do not contribute any key/value pairs for the form value. .ie n .IP "$input\->form_name_value" 4 .el .IP "\f(CW$input\fR\->form_name_value" 4 .IX Item "$input->form_name_value" Returns a (possible empty) list of key/value pairs that should be incorporated in the form value from this input. .ie n .IP "$input\->check" 4 .el .IP "\f(CW$input\fR\->check" 4 .IX Item "$input->check" Some input types represent toggles that can be turned on/off. This includes \*(L"checkbox\*(R" and \*(L"option\*(R" inputs. Calling this method turns this input on without having to know the value name. If the input is already on, then nothing happens. .Sp This has the same effect as: .Sp .Vb 1 \& $input\->value($input\->possible_values[1]); .Ve .Sp The input can be turned off with: .Sp .Vb 1 \& $input\->value(undef); .Ve .ie n .IP "$input\->click($form, $x, $y)" 4 .el .IP "\f(CW$input\fR\->click($form, \f(CW$x\fR, \f(CW$y\fR)" 4 .IX Item "$input->click($form, $x, $y)" Some input types (currently \*(L"submit\*(R" buttons and \*(L"images\*(R") can be clicked to submit the form. The \fIclick()\fR method returns the corresponding \f(CW\*(C`HTTP::Request\*(C'\fR object. .PP If the input is of type \f(CW\*(C`file\*(C'\fR, then it has these additional methods: .ie n .IP "$input\->file" 4 .el .IP "\f(CW$input\fR\->file" 4 .IX Item "$input->file" This is just an alias for the \fIvalue()\fR method. It sets the filename to read data from. .ie n .IP "$filename = $input\->filename" 4 .el .IP "\f(CW$filename\fR = \f(CW$input\fR\->filename" 4 .IX Item "$filename = $input->filename" .PD 0 .ie n .IP "$input\->filename( $new_filename )" 4 .el .IP "\f(CW$input\fR\->filename( \f(CW$new_filename\fR )" 4 .IX Item "$input->filename( $new_filename )" .PD This get/sets the filename reported to the server during file upload. This attribute defaults to the value reported by the \fIfile()\fR method. .ie n .IP "$content = $input\->content" 4 .el .IP "\f(CW$content\fR = \f(CW$input\fR\->content" 4 .IX Item "$content = $input->content" .PD 0 .ie n .IP "$input\->content( $new_content )" 4 .el .IP "\f(CW$input\fR\->content( \f(CW$new_content\fR )" 4 .IX Item "$input->content( $new_content )" .PD This get/sets the file content provided to the server during file upload. This method can be used if you do not want the content to be read from an actual file. .ie n .IP "@headers = $input\->headers" 4 .el .IP "\f(CW@headers\fR = \f(CW$input\fR\->headers" 4 .IX Item "@headers = $input->headers" .PD 0 .ie n .IP "input\->headers($key => $value, .... )" 4 .el .IP "input\->headers($key => \f(CW$value\fR, .... )" 4 .IX Item "input->headers($key => $value, .... )" .PD This get/set additional header fields describing the file uploaded. This can for instance be used to set the \f(CW\*(C`Content\-Type\*(C'\fR reported for the file. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\s-1LWP\s0, LWP::UserAgent, HTML::Parser .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 1998\-2005 Gisle Aas. .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`