URI-1.35 > 1.54 との差分

URI::QueryParam 1.54 と 1.35 の差分

11
22=encoding euc-jp
33
44=head1 NAME
55
66=begin original
77
88URI::QueryParam - Additional query methods for URIs
99
1010=end original
1111
1212URI::QueryParam - URI のための追加のクエリメソッド
1313
1414=head1 SYNOPSIS
1515
1616 use URI;
1717 use URI::QueryParam;
1818
1919 $u = URI->new("", "http");
2020 $u->query_param(foo => 1, 2, 3);
2121 print $u->query; # prints foo=1&foo=2&foo=3
2222
2323 for my $key ($u->query_param) {
2424 print "$key: ", join(", ", $u->query_param($key)), "\n";
2525 }
2626
2727=head1 DESCRIPTION
2828
2929=begin original
3030
3131Loading the C<URI::QueryParam> module adds some extra methods to
3232URIs that support query methods. These methods provide an alternative
3333interface to the $u->query_form data.
3434
3535=end original
3636
37C<URI::QueryParam> モジュールを読み込むことで、
37Loading the C<URI::QueryParam> module adds some extra methods to
38query メソッドに対応している URI にいくつかのメソッドを追加します。
38URIs that support query methods. These methods provide an alternative
39これらのメソッドは $u->query_form データに対する代替インターフェースを
39interface to the $u->query_form data.
40提供します。
40(TBT)
4141
4242=begin original
4343
4444The query_param_* methods have deliberately been made identical to the
4545interface of the corresponding C<CGI.pm> methods.
4646
4747=end original
4848
49query_param_* メソッドは、対応する C<CGI.pm> メソッドの
49The query_param_* methods have deliberately been made identical to the
50インターフェースと故意に同じにしています。
50interface of the corresponding C<CGI.pm> methods.
51(TBT)
5152
5253=begin original
5354
5455The following additional methods are made available:
5556
5657=end original
5758
58次の追加のメソッドが利用可能です:
59The following additional methods are made available:
60(TBT)
5961
6062=over
6163
6264=item @keys = $u->query_param
6365
6466=item @values = $u->query_param( $key )
6567
6668=item $first_value = $u->query_param( $key )
6769
6870=item $u->query_param( $key, $value,... )
6971
7072=begin original
7173
7274If $u->query_param is called with no arguments, it returns all the
7375distinct parameter keys of the URI. In a scalar context it returns the
7476number of distinct keys.
7577
7678=end original
7779
78$u->query_param が引数なしで呼び出されると、
80If $u->query_param is called with no arguments, it returns all the
79URI の全ての異なるパラメータキーを返します。
81distinct parameter keys of the URI. In a scalar context it returns the
80スカラコンテキストでは、異なるキーの数を返します。
82number of distinct keys.
83(TBT)
8184
8285=begin original
8386
8487When a $key argument is given, the method returns the parameter values with the
8588given key. In a scalar context, only the first parameter value is
8689returned.
8790
8891=end original
8992
90$key 引数が与えられると、このメソッドは与えられたキーの
93When a $key argument is given, the method returns the parameter values with the
91パラメータ値を返します。
94given key. In a scalar context, only the first parameter value is
92スカラコンテキストでは、最初のパラメータ値のみが返されます。
95returned.
96(TBT)
9397
9498=begin original
9599
96100If additional arguments are given, they are used to update successive
97101parameters with the given key. If any of the values provided are
98102array references, then the array is dereferenced to get the actual
99103values.
100104
101105=end original
102106
103追加の引数が与えられると、これらは指定されたキーの
107If additional arguments are given, they are used to update successive
104それぞれのパラメータを更新するために使われます。
108parameters with the given key. If any of the values provided are
105提供された値のどれかが配列リファレンスの場合、
109array references, then the array is dereferenced to get the actual
106配列は実際の値を得るためにデリファレンスされます。
110values.
111(TBT)
107112
108113=item $u->query_param_append($key, $value,...)
109114
110115=begin original
111116
112117Adds new parameters with the given
113118key without touching any old parameters with the same key. It
114119can be explained as a more efficient version of:
115120
116121=end original
117122
118与えられたキーに対して、そのキーの古いパラメータに触れることなく、
123Adds new parameters with the given
119新しいパラメータを追加します。
124key without touching any old parameters with the same key. It
120これは次のもののより効率の良い版です:
125can be explained as a more efficient version of:
126(TBT)
121127
122128 $u->query_param($key,
123129 $u->query_param($key),
124130 $value,...);
125131
126132=begin original
127133
128134One difference is that this expression would return the old values
129135of $key, whereas the query_param_append() method does not.
130136
131137=end original
132138
133一つの違いは、この式は $key の古い値を返しますが、
139One difference is that this expression would return the old values
134query_param_append() メソッドはそうではないことです。
140of $key, whereas the query_param_append() method does not.
141(TBT)
135142
136143=item @values = $u->query_param_delete($key)
137144
138145=item $first_value = $u->query_param_delete($key)
139146
140147=begin original
141148
142149Deletes all key/value pairs with the given key.
143150The old values are returned. In a scalar context, only the first value
144151is returned.
145152
146153=end original
147154
148与えられたキーに関する全てのキー/値を削除します。
155Deletes all key/value pairs with the given key.
149以前の値が返されます。
156The old values are returned. In a scalar context, only the first value
150スカラコンテキストでは、最初の値のみが返されます。
157is returned.
158(TBT)
151159
152160=begin original
153161
154162Using the query_param_delete() method is slightly more efficient than
155163the equivalent:
156164
157165=end original
158166
159query_param_delete() メソッドを使うことは、
167Using the query_param_delete() method is slightly more efficient than
160次の等価物よりやや効率の良いものです:
168the equivalent:
169(TBT)
161170
162171 $u->query_param($key, []);
163172
164173=item $hashref = $u->query_form_hash
165174
166175=item $u->query_form_hash( \%new_form )
167176
168177=begin original
169178
170179Returns a reference to a hash that represents the
171180query form's key/value pairs. If a key occurs multiple times, then the hash
172181value becomes an array reference.
173182
174183=end original
175184
176クエリ形式のキー/値の組を表現するハッシュへのリファレンスを返します。
185Returns a reference to a hash that represents the
177キーが複数回現れる場合、ハッシュ値は配列リファレンスになります。
186query form's key/value pairs. If a key occurs multiple times, then the hash
187value becomes an array reference.
188(TBT)
178189
179190=begin original
180191
181192Note that sequence information is lost. This means that:
182193
183194=end original
184195
185並びの情報は失われることに注意してください。
196Note that sequence information is lost. This means that:
186つまり次のものは:
197(TBT)
187198
188 $u->query_form_hash($u->query_form_hash);
199 $u->query_form_hash($u->query_form_hash)
189200
190201=begin original
191202
192203is not necessarily a no-op, as it may reorder the key/value pairs.
193204The values returned by the query_param() method should stay the same
194205though.
195206
196207=end original
197208
198キー/値の組の順序が変わるかもしれないので、
209is not necessarily a no-op, as it may reorder the key/value pairs.
199必ずしも何もしないわけではありません。
210The values returned by the query_param() method should stay the same
200しかし、query_param() メソッドで返される値は、
211though.
201同じのままのはずです。
212(TBT)
202213
203214=back
204215
205216=head1 SEE ALSO
206217
207218L<URI>, L<CGI>
208219
209220=head1 COPYRIGHT
210221
211222Copyright 2002 Gisle Aas.
212223
213224=begin meta
214225
215Translate: SHIRAKATA Kentaro <argrath@ub32.org> (1.35-)
226Translate: SHIRAKATA Kentaro <argrath@ub32.org> (1.35)
216Status: completed
227Status: in progress
217228
218229=end meta
219230
220231=cut