URI-1.35 >
1.54
との差分
URI 1.54 と 1.35 の差分
1 | 1 | |
2 | 2 | =encoding euc-jp |
3 | 3 | |
4 | 4 | =head1 NAME |
5 | 5 | |
6 | 6 | =begin original |
7 | 7 | |
8 | 8 | URI - Uniform Resource Identifiers (absolute and relative) |
9 | 9 | |
10 | 10 | =end original |
11 | 11 | |
12 | 12 | URI - (絶対や相対の)統一資源識別子(Uniform Resource Identifiers) |
13 | 13 | |
14 | 14 | =head1 SYNOPSIS |
15 | 15 | |
16 | 16 | $u1 = URI->new("http://www.perl.com"); |
17 | 17 | $u2 = URI->new("foo", "http"); |
18 | 18 | $u3 = $u2->abs($u1); |
19 | 19 | $u4 = $u3->clone; |
20 | 20 | $u5 = URI->new("HTTP://WWW.perl.com:80")->canonical; |
21 | 21 | |
22 | 22 | $str = $u->as_string; |
23 | 23 | $str = "$u"; |
24 | 24 | |
25 | 25 | $scheme = $u->scheme; |
26 | 26 | $opaque = $u->opaque; |
27 | 27 | $path = $u->path; |
28 | 28 | $frag = $u->fragment; |
29 | 29 | |
30 | 30 | $u->scheme("ftp"); |
31 | 31 | $u->host("ftp.perl.com"); |
32 | 32 | $u->path("cpan/"); |
33 | 33 | |
34 | 34 | =head1 DESCRIPTION |
35 | 35 | |
36 | 36 | =begin original |
37 | 37 | |
38 | 38 | This module implements the C<URI> class. Objects of this class |
39 | 39 | represent "Uniform Resource Identifier references" as specified in RFC |
40 | 40 | 2396 (and updated by RFC 2732). |
41 | 41 | |
42 | 42 | =end original |
43 | 43 | |
44 | 44 | このモジュールは C<URI> クラスを実装します。 |
45 | 45 | このクラスのオブジェクトは RFC 2396 で |
46 | 46 | 指定されている (そして RFC 2732 更新された) |
47 | 47 | 統一資源識別子参照 ("Uniform Resource Identifier references")を |
48 | 48 | 表わしています。 |
49 | 49 | |
50 | 50 | =begin original |
51 | 51 | |
52 | 52 | A Uniform Resource Identifier is a compact string of characters that |
53 | 53 | identifies an abstract or physical resource. A Uniform Resource |
54 | 54 | Identifier can be further classified as either a Uniform Resource Locator |
55 | 55 | (URL) or a Uniform Resource Name (URN). The distinction between URL |
56 | 56 | and URN does not matter to the C<URI> class interface. A |
57 | 57 | "URI-reference" is a URI that may have additional information attached |
58 | 58 | in the form of a fragment identifier. |
59 | 59 | |
60 | 60 | =end original |
61 | 61 | |
62 | 62 | 統一資源識別子 (Uniform Resource Identifier) は抽象的あるいは物理的 |
63 | 63 | リソースを識別するための文字のコンパクトな文字列です。 |
64 | 64 | 統一資源識別子はさらに統一資源位置指定子 (Uniform Resource Locator) (URL) と |
65 | 65 | 統一資源名 (Uniform Resource Name) (URN) に分類することができます。 |
66 | 66 | URL と URN の違いは C<URI> クラスインターフェースには関係ありません。 |
67 | 67 | URI 参照 ("URI-reference") は、 |
68 | 68 | フラグメントXS識別子 (fragment identifier) の形式で付けられる追加の情報を |
69 | 69 | 持つことがある URI です。 |
70 | 70 | |
71 | 71 | =begin original |
72 | 72 | |
73 | 73 | An absolute URI reference consists of three parts: a I<scheme>, a |
74 | 74 | I<scheme-specific part> and a I<fragment> identifier. A subset of URI |
75 | 75 | references share a common syntax for hierarchical namespaces. For |
76 | 76 | these, the scheme-specific part is further broken down into |
77 | 77 | I<authority>, I<path> and I<query> components. These URIs can also |
78 | 78 | take the form of relative URI references, where the scheme (and |
79 | 79 | usually also the authority) component is missing, but implied by the |
80 | 80 | context of the URI reference. The three forms of URI reference |
81 | 81 | syntax are summarized as follows: |
82 | 82 | |
83 | 83 | =end original |
84 | 84 | |
85 | 85 | 絶対 URI リファレンスは三つの部分で構成されます: I<スキーム>(scheme)、 |
86 | 86 | I<スキーム独自部分> (scheme specific part)、 |
87 | 87 | そして I<フラグメント> 識別子です。 |
88 | 88 | URI リファレンスのサブセットは階層的名前空間のための共通の文法を共有します。 |
89 | 89 | これらのためスキーム独自部分は、さらに I<authority>, I<path>, |
90 | 90 | I<query> 要素に分けられます。 |
91 | 91 | これらの URI は相対 URI リファレンスの形式を取ることもできます。 |
92 | 92 | そこでは scheme (そして通常は authority も)要素がなく、しかし URI |
93 | 93 | リファレンスの文脈により暗黙のうちに決められています。 |
94 | 94 | URI リファレンスの書式の三つの形式は、以下のようにまとめることができます: |
95 | 95 | |
96 | 96 | <scheme>:<scheme-specific-part>#<fragment> |
97 | 97 | <scheme>://<authority><path>?<query>#<fragment> |
98 | 98 | <path>?<query>#<fragment> |
99 | 99 | |
100 | 100 | =begin original |
101 | 101 | |
102 | 102 | The components into which a URI reference can be divided depend on the |
103 | 103 | I<scheme>. The C<URI> class provides methods to get and set the |
104 | 104 | individual components. The methods available for a specific |
105 | 105 | C<URI> object depend on the scheme. |
106 | 106 | |
107 | 107 | =end original |
108 | 108 | |
109 | 109 | URI リファレンスの構成要素はスキームに依存して分割されます。 |
110 | 110 | C<URI> クラスは個々の構成要素を取得し、設定するメソッドを提供します。 |
111 | 111 | 特定の C<URI> オブジェクトのために利用できるメソッドはスキームに依存します。 |
112 | 112 | |
113 | 113 | =head1 CONSTRUCTORS |
114 | 114 | |
115 | 115 | (コンストラクタ) |
116 | 116 | |
117 | 117 | =begin original |
118 | 118 | |
119 | 119 | The following methods construct new C<URI> objects: |
120 | 120 | |
121 | 121 | =end original |
122 | 122 | |
123 | 123 | 以下のメソッドが新しい C<URI> オブジェクトを組み立てます: |
124 | 124 | |
125 | 125 | =over 4 |
126 | 126 | |
127 | 127 | =item $uri = URI->new( $str ) |
128 | 128 | |
129 | 129 | =item $uri = URI->new( $str, $scheme ) |
130 | 130 | |
131 | 131 | =begin original |
132 | 132 | |
133 | 133 | Constructs a new URI object. The string |
134 | 134 | representation of a URI is given as argument, together with an optional |
135 | 135 | scheme specification. Common URI wrappers like "" and <>, as well as |
136 | 136 | leading and trailing white space, are automatically removed from |
137 | 137 | the $str argument before it is processed further. |
138 | 138 | |
139 | 139 | =end original |
140 | 140 | |
141 | 141 | 新しい URI オブジェクトを組み立てます。 |
142 | 142 | URI の文字列表現が引数として、オプションのスキーム指定とともに与えられます。 |
143 | 143 | "" や <> のような共通の URI ラッパ、そして前や後ろにつく空白は、さらに |
144 | 144 | 処理される前に自動的に $str 引数から削除されます。 |
145 | 145 | |
146 | 146 | =begin original |
147 | 147 | |
148 | 148 | The constructor determines the scheme, maps this to an appropriate |
149 | 149 | URI subclass, constructs a new object of that class and returns it. |
150 | 150 | |
151 | 151 | =end original |
152 | 152 | |
153 | 153 | コンストラクタはスキームを判定し、これを適切な URI サブクラスにマップし、 |
154 | 154 | そのクラスの新しいオブジェクトを組み立て、それを返します。 |
155 | 155 | |
156 | 156 | =begin original |
157 | 157 | |
158 | 158 | The $scheme argument is only used when $str is a |
159 | 159 | relative URI. It can be either a simple string that |
160 | 160 | denotes the scheme, a string containing an absolute URI reference, or |
161 | 161 | an absolute C<URI> object. If no $scheme is specified for a relative |
162 | 162 | URI $str, then $str is simply treated as a generic URI (no scheme-specific |
163 | 163 | methods available). |
164 | 164 | |
165 | 165 | =end original |
166 | 166 | |
167 | 167 | $scheme 引数は $str が相対 URI のときだけ使われます。 |
168 | 168 | それにはスキームを示す単純な文字列、絶対 URI リファレンスが入った文字列、 |
169 | 169 | 絶対 C<URI> オブジェクトが指定できます。 |
170 | 170 | 相対 URI に $scheme が指定されなければ、$str は単純に(何もスキーム独自の |
171 | 171 | メソッドが使えない)汎用の URI として扱われます。 |
172 | 172 | |
173 | 173 | =begin original |
174 | 174 | |
175 | 175 | The set of characters available for building URI references is |
176 | 176 | restricted (see L<URI::Escape>). Characters outside this set are |
177 | 177 | automatically escaped by the URI constructor. |
178 | 178 | |
179 | 179 | =end original |
180 | 180 | |
181 | 181 | URI リファレンスを組み立てるために使える文字のセットは |
182 | 182 | 制限されています(L<URI::Escape> を参照してください)。 |
183 | 183 | このセットから外れる文字は URI コンストラクタにより自動的に |
184 | 184 | エスケープされます。 |
185 | 185 | |
186 | 186 | =item $uri = URI->new_abs( $str, $base_uri ) |
187 | 187 | |
188 | 188 | =begin original |
189 | 189 | |
190 | 190 | Constructs a new absolute URI object. The $str argument can |
191 | 191 | denote a relative or absolute URI. If relative, then it is |
192 | 192 | absolutized using $base_uri as base. The $base_uri must be an absolute |
193 | 193 | URI. |
194 | 194 | |
195 | 195 | =end original |
196 | 196 | |
197 | 197 | 新しい絶対 URI オブジェクトを組み立てます。 |
198 | 198 | $str 引数は相対もしくは絶対 URI を示すことができます。 |
199 | 199 | そしてそれは $base_uri をベースとして使うことによって、絶対化されます。 |
200 | 200 | $base_uri は絶対 URI でなければなりません。 |
201 | 201 | |
202 | 202 | =item $uri = URI::file->new( $filename ) |
203 | 203 | |
204 | 204 | =item $uri = URI::file->new( $filename, $os ) |
205 | 205 | |
206 | 206 | =begin original |
207 | 207 | |
208 | 208 | Constructs a new I<file> URI from a file name. See L<URI::file>. |
209 | 209 | |
210 | 210 | =end original |
211 | 211 | |
212 | 212 | ファイル名から新しい I<file> URI を組み立てます。 |
213 | 213 | L<URI::file> を参照してください。 |
214 | 214 | |
215 | 215 | =item $uri = URI::file->new_abs( $filename ) |
216 | 216 | |
217 | 217 | =item $uri = URI::file->new_abs( $filename, $os ) |
218 | 218 | |
219 | 219 | =begin original |
220 | 220 | |
221 | 221 | Constructs a new absolute I<file> URI from a file name. See |
222 | 222 | L<URI::file>. |
223 | 223 | |
224 | 224 | =end original |
225 | 225 | |
226 | 226 | ファイル名から新しい絶対 I<file> URI を組み立てます。 |
227 | 227 | L<URI::file> を参照してください。 |
228 | 228 | |
229 | 229 | =item $uri = URI::file->cwd |
230 | 230 | |
231 | 231 | =begin original |
232 | 232 | |
233 | 233 | Returns the current working directory as a I<file> URI. See |
234 | 234 | L<URI::file>. |
235 | 235 | |
236 | 236 | =end original |
237 | 237 | |
238 | 238 | 現在作業中のディレクトリを I<file> URI として返します。 |
239 | 239 | L<URI::file> を参照してください。 |
240 | 240 | |
241 | 241 | =item $uri->clone |
242 | 242 | |
243 | 243 | =begin original |
244 | 244 | |
245 | 245 | Returns a copy of the $uri. |
246 | 246 | |
247 | 247 | =end original |
248 | 248 | |
249 | 249 | このメソッドは $uri のコピーを返します。 |
250 | 250 | |
251 | 251 | =back |
252 | 252 | |
253 | 253 | =head1 COMMON METHODS |
254 | 254 | |
255 | 255 | (共通メソッド) |
256 | 256 | |
257 | 257 | =begin original |
258 | 258 | |
259 | 259 | The methods described in this section are available for all C<URI> |
260 | 260 | objects. |
261 | 261 | |
262 | 262 | =end original |
263 | 263 | |
264 | 264 | このセクションで説明されるメソッドはすべての C<URI> オブジェクトで |
265 | 265 | 利用可能です。 |
266 | 266 | |
267 | 267 | =begin original |
268 | 268 | |
269 | 269 | Methods that give access to components of a URI always return the |
270 | 270 | old value of the component. The value returned is C<undef> if the |
271 | 271 | component was not present. There is generally a difference between a |
272 | 272 | component that is empty (represented as C<"">) and a component that is |
273 | 273 | missing (represented as C<undef>). If an accessor method is given an |
274 | 274 | argument, it updates the corresponding component in addition to |
275 | 275 | returning the old value of the component. Passing an undefined |
276 | 276 | argument removes the component (if possible). The description of |
277 | 277 | each accessor method indicates whether the component is passed as |
278 | 278 | an escaped or an unescaped string. A component that can be further |
279 | 279 | divided into sub-parts are usually passed escaped, as unescaping might |
280 | 280 | change its semantics. |
281 | 281 | |
282 | 282 | =end original |
283 | 283 | |
284 | 284 | L<URI> の構成要素へのアクセスを提供するメソッドは常にその構成要素の |
285 | 285 | 古い値を返します。 |
286 | 286 | その構成要素がなければ返される値は C<undef> になります。 |
287 | 287 | 一般的に構成要素が空であること(C<""> で表されます)と構成要素がないこと |
288 | 288 | (C<undef> で表されます)には違いがあります。 |
289 | 289 | もしアクセサメソッドに引数が与えられれば、それは対応する構成要素を更新し、 |
290 | 290 | その構成要素の古い値を返します。 |
291 | 291 | 未定義の引数を渡すと、(もし可能であれば)その構成要素を削除します。 |
292 | 292 | それぞれのアクセサメソッドの説明がそのコンポーネントにエスケープされた |
293 | 293 | 文字列として渡すのかあるいは、エスケープされない文字列として渡すのかを |
294 | 294 | 示します。 |
295 | 295 | さらに細かい部分に分割できる構成要素は、通常エスケープされて渡されます。 |
296 | 296 | これはエスケープされていないとその意味が変わってしまうからです。 |
297 | 297 | |
298 | 298 | =begin original |
299 | 299 | |
300 | 300 | The common methods available for all URI are: |
301 | 301 | |
302 | 302 | =end original |
303 | 303 | |
304 | 304 | すべての URI で利用可能な共通メソッドを以下に示します: |
305 | 305 | |
306 | 306 | =over 4 |
307 | 307 | |
308 | 308 | =item $uri->scheme |
309 | 309 | |
310 | 310 | =item $uri->scheme( $new_scheme ) |
311 | 311 | |
312 | 312 | =begin original |
313 | 313 | |
314 | 314 | Sets and returns the scheme part of the $uri. If the $uri is |
315 | 315 | relative, then $uri->scheme returns C<undef>. If called with an |
316 | 316 | argument, it updates the scheme of $uri, possibly changing the |
317 | 317 | class of $uri, and returns the old scheme value. The method croaks |
318 | 318 | if the new scheme name is illegal; a scheme name must begin with a |
319 | 319 | letter and must consist of only US-ASCII letters, numbers, and a few |
320 | 320 | special marks: ".", "+", "-". This restriction effectively means |
321 | 321 | that the scheme must be passed unescaped. Passing an undefined |
322 | 322 | argument to the scheme method makes the URI relative (if possible). |
323 | 323 | |
324 | 324 | =end original |
325 | 325 | |
326 | 326 | $uri のスキーム部分を設定し、返します。 |
327 | 327 | もし $uri が相対であれば、$uri->scheme は C<undef> を返します。 |
328 | 328 | もし引数付きで呼ばれれば、$uri のスキームを更新し、おそらく $uri の |
329 | 329 | クラスを変更します。 |
330 | 330 | そして古いスキームの値を返します。 |
331 | 331 | 新しいスキーム名が不正であれば croak します: スキーム名は文字で始まり、 |
332 | 332 | US-ASCII、数字そしていくつかの特別な記号: "."、"+"、"-" だけで |
333 | 333 | 構成されなければなりません。 |
334 | 334 | この制限は実質的にスキームはエスケープなしに渡されるべきであることを |
335 | 335 | 意味しています。 |
336 | 336 | スキームに未定義の引数を渡すと(可能であれば) URI は相対になります。 |
337 | 337 | |
338 | 338 | =begin original |
339 | 339 | |
340 | 340 | Letter case does not matter for scheme names. The string |
341 | 341 | returned by $uri->scheme is always lowercase. If you want the scheme |
342 | 342 | just as it was written in the URI in its original case, |
343 | 343 | you can use the $uri->_scheme method instead. |
344 | 344 | |
345 | 345 | =end original |
346 | 346 | |
347 | 347 | 文字の大文字/小文字はスキーム名では問題ありません。 |
348 | 348 | $uri->scheme で返される値は常に小文字です。 |
349 | 349 | もし URI に書いた元の大文字/小文字の状態が欲しいのであれば、代わりに |
350 | 350 | $uri->_scheme メソッドを使うことができます。 |
351 | 351 | |
352 | 352 | =item $uri->opaque |
353 | 353 | |
354 | 354 | =item $uri->opaque( $new_opaque ) |
355 | 355 | |
356 | 356 | =begin original |
357 | 357 | |
358 | 358 | Sets and returns the scheme-specific part of the $uri |
359 | 359 | (everything between the scheme and the fragment) |
360 | 360 | as an escaped string. |
361 | 361 | |
362 | 362 | =end original |
363 | 363 | |
364 | 364 | $uri のスキーム独自部分(スキームからフラグメントまでのすべて)を、 |
365 | 365 | エスケープされた文字列として、設定し、返します。 |
366 | 366 | |
367 | 367 | =item $uri->path |
368 | 368 | |
369 | 369 | =item $uri->path( $new_path ) |
370 | 370 | |
371 | 371 | =begin original |
372 | 372 | |
373 | 373 | Sets and returns the same value as $uri->opaque unless the URI |
374 | 374 | supports the generic syntax for hierarchical namespaces. |
375 | 375 | In that case the generic method is overridden to set and return |
376 | 376 | the part of the URI between the I<host name> and the I<fragment>. |
377 | 377 | |
378 | 378 | =end original |
379 | 379 | |
380 | 380 | URI が階層的な名前空間のための一般的な書式をサポートしていなければ、 |
381 | 381 | このメソッドは $uri->opaque と同じ値を設定し、返します。 |
382 | 382 | その場合、I<ホスト名> と I<フラグメント> の間にある URI の一部を設定し、 |
383 | 383 | 返すように汎用メソッドがオーバーライドされます。 |
384 | 384 | |
385 | 385 | =item $uri->fragment |
386 | 386 | |
387 | 387 | =item $uri->fragment( $new_frag ) |
388 | 388 | |
389 | 389 | =begin original |
390 | 390 | |
391 | 391 | Returns the fragment identifier of a URI reference |
392 | 392 | as an escaped string. |
393 | 393 | |
394 | 394 | =end original |
395 | 395 | |
396 | 396 | URI リファレンスのフラグメント識別子をエスケープされた文字列として |
397 | 397 | 返します。 |
398 | 398 | |
399 | 399 | =item $uri->as_string |
400 | 400 | |
401 | 401 | =begin original |
402 | 402 | |
403 | Returns a URI object to a plain | |
403 | Returns a URI object to a plain string. URI objects are | |
404 | 404 | also converted to plain strings automatically by overloading. This |
405 | 405 | means that $uri objects can be used as plain strings in most Perl |
406 | 406 | constructs. |
407 | 407 | |
408 | 408 | =end original |
409 | 409 | |
410 | URI オブジェクトをプレ | |
410 | URI オブジェクトをプレインな文字列にして返します。 | |
411 | 411 | URI オブジェクトはオーバーロードによっても自動的にプレーンな文字列に |
412 | 412 | 変換されます。 |
413 | 413 | つまり $uri オブジェクトはほとんどの Perl 構造においてプレーンな |
414 | 414 | 文字列として扱うことができるということです。 |
415 | 415 | |
416 | =item $uri->as_iri | |
417 | ||
418 | =begin original | |
419 | ||
420 | Returns a Unicode string representing the URI. Escaped UTF-8 sequences | |
421 | representing non-ASCII characters are turned into their corresponding Unicode | |
422 | code point. | |
423 | ||
424 | =end original | |
425 | ||
426 | URI を表現する Unicode 文字列を返します。 | |
427 | 非 ASCII 文字を表現するエスケープされた UTF-8 並びは、 | |
428 | 対応する Unicode 符号位置に変換されます。 | |
429 | ||
430 | 416 | =item $uri->canonical |
431 | 417 | |
432 | 418 | =begin original |
433 | 419 | |
434 | 420 | Returns a normalized version of the URI. The rules |
435 | 421 | for normalization are scheme-dependent. They usually involve |
436 | 422 | lowercasing the scheme and Internet host name components, |
437 | 423 | removing the explicit port specification if it matches the default port, |
438 | 424 | uppercasing all escape sequences, and unescaping octets that can be |
439 | 425 | better represented as plain characters. |
440 | 426 | |
441 | 427 | =end original |
442 | 428 | |
443 | 429 | URI の正規化されたものを返します。 |
444 | 430 | 正規化のルールはスキームによって違います。 |
445 | 431 | 通常はスキームとインターネットホスト名要素の小文字化、 |
446 | 432 | デフォルトポートと同じになっている明確なポート指定の削除、すべての |
447 | 433 | エスケープシーケンスの大文字化、普通に表現することができる |
448 | 434 | エスケープされていオクテットの通常化です。 |
449 | 435 | |
450 | 436 | =begin original |
451 | 437 | |
452 | 438 | For efficiency reasons, if the $uri is already in normalized form, |
453 | 439 | then a reference to it is returned instead of a copy. |
454 | 440 | |
455 | 441 | =end original |
456 | 442 | |
457 | 443 | 効率の理由から、$uri がすでに正規化されている形式であれば、コピーの代わりに |
458 | 444 | それへのリファレンスが返されます。 |
459 | 445 | |
460 | 446 | =item $uri->eq( $other_uri ) |
461 | 447 | |
462 | 448 | =item URI::eq( $first_uri, $other_uri ) |
463 | 449 | |
464 | 450 | =begin original |
465 | 451 | |
466 | 452 | Tests whether two URI references are equal. URI references |
467 | 453 | that normalize to the same string are considered equal. The method |
468 | 454 | can also be used as a plain function which can also test two string |
469 | 455 | arguments. |
470 | 456 | |
471 | 457 | =end original |
472 | 458 | |
473 | 459 | 二つの URI リファレンスが同一であるかを調べます。 |
474 | 460 | 同じ文字列に正規化された URI リファレンスは同一であると考えます。 |
475 | 461 | メソッドは二つの文字列引数テストすることもできる単なる関数として使うことも |
476 | 462 | 出来ます。 |
477 | 463 | |
478 | 464 | =begin original |
479 | 465 | |
480 | 466 | If you need to test whether two C<URI> object references denote the |
481 | 467 | same object, use the '==' operator. |
482 | 468 | |
483 | 469 | =end original |
484 | 470 | |
485 | 471 | 二つの C<URI> オブジェクトリファレンスが同じオブジェクトを示しているかを |
486 | 472 | テストする必要があれば、'==' 演算子を使ってください。 |
487 | 473 | |
488 | 474 | =item $uri->abs( $base_uri ) |
489 | 475 | |
490 | 476 | =begin original |
491 | 477 | |
492 | 478 | Returns an absolute URI reference. If $uri is already |
493 | 479 | absolute, then a reference to it is simply returned. If the $uri |
494 | 480 | is relative, then a new absolute URI is constructed by combining the |
495 | 481 | $uri and the $base_uri, and returned. |
496 | 482 | |
497 | 483 | =end original |
498 | 484 | |
499 | 485 | 絶対 URI リファレンスを返します。 |
500 | 486 | もし $uri がすでに絶対であれば、それへのリファレンスが単に返されます。 |
501 | 487 | $uri が相対であれば、$uri と $base_uri をつなげることにより新しい |
502 | 488 | 絶対 URI が組み立てられ、返されます。 |
503 | 489 | |
504 | 490 | =item $uri->rel( $base_uri ) |
505 | 491 | |
506 | 492 | =begin original |
507 | 493 | |
508 | 494 | Returns a relative URI reference if it is possible to |
509 | 495 | make one that denotes the same resource relative to $base_uri. |
510 | 496 | If not, then $uri is simply returned. |
511 | 497 | |
512 | 498 | =end original |
513 | 499 | |
514 | 500 | 同じリソースを表す $base_uri への相対を作ることが出来れば、 |
515 | 501 | 相対 URI リファレンスを返します。 |
516 | 502 | そうでなければ、$uri が単に返されます。 |
517 | 503 | |
518 | =item $uri->secure | |
519 | ||
520 | =begin original | |
521 | ||
522 | Returns a TRUE value if the URI is considered to point to a resource on | |
523 | a secure channel, such as an SSL or TLS encrypted one. | |
524 | ||
525 | =end original | |
526 | ||
527 | URI が、 SSL や TLS で暗号化されているような、安全なチャンネルの | |
528 | 資源を示していると考えられる場合に、真の値を返します。 | |
529 | ||
530 | 504 | =back |
531 | 505 | |
532 | 506 | =head1 GENERIC METHODS |
533 | 507 | |
534 | 508 | (汎用メソッド) |
535 | 509 | |
536 | 510 | =begin original |
537 | 511 | |
538 | 512 | The following methods are available to schemes that use the |
539 | 513 | common/generic syntax for hierarchical namespaces. The descriptions of |
540 | 514 | schemes below indicate which these are. Unknown schemes are |
541 | 515 | assumed to support the generic syntax, and therefore the following |
542 | 516 | methods: |
543 | 517 | |
544 | 518 | =end original |
545 | 519 | |
546 | 520 | 以下のメソッドは、階層的名前空間のための共通/汎用の書式を使う |
547 | 521 | スキームに使うことが出来ます。 |
548 | 522 | 下記のスキームの説明はこれらであることを示します。 |
549 | 523 | 分からないスキームは汎用の書式をサポートしており、そのため |
550 | 524 | 以下のメソッドをサポートしているものと考えられます。 |
551 | 525 | |
552 | 526 | =over 4 |
553 | 527 | |
554 | 528 | =item $uri->authority |
555 | 529 | |
556 | 530 | =item $uri->authority( $new_authority ) |
557 | 531 | |
558 | 532 | =begin original |
559 | 533 | |
560 | 534 | Sets and returns the escaped authority component |
561 | 535 | of the $uri. |
562 | 536 | |
563 | 537 | =end original |
564 | 538 | |
565 | 539 | $uri のエスケープされた authority(認証)構成要素を設定し、返します。 |
566 | 540 | |
567 | 541 | =item $uri->path |
568 | 542 | |
569 | 543 | =item $uri->path( $new_path ) |
570 | 544 | |
571 | 545 | =begin original |
572 | 546 | |
573 | 547 | Sets and returns the escaped path component of |
574 | 548 | the $uri (the part between the host name and the query or fragment). |
575 | 549 | The path can never be undefined, but it can be the empty string. |
576 | 550 | |
577 | 551 | =end original |
578 | 552 | |
579 | 553 | $uri のエスケープされた path 構成要素(ホスト名とクエリ(=query)または |
580 | 554 | フラグメントの間の部分)を設定し、返します。 |
581 | 555 | path は決して未定義になりませんが、空文字列にすることは出来ます。 |
582 | 556 | |
583 | 557 | =item $uri->path_query |
584 | 558 | |
585 | 559 | =item $uri->path_query( $new_path_query ) |
586 | 560 | |
587 | 561 | =begin original |
588 | 562 | |
589 | 563 | Sets and returns the escaped path and query |
590 | 564 | components as a single entity. The path and the query are |
591 | 565 | separated by a "?" character, but the query can itself contain "?". |
592 | 566 | |
593 | 567 | =end original |
594 | 568 | |
595 | 569 | エスケープされた path と query 構成要素を1つのエンティティとして設定し、 |
596 | 570 | 取得します。 |
597 | 571 | path と query は "?" 文字により分けられますが、query それ自身に |
598 | 572 | "?" を入れることが出来ます。 |
599 | 573 | |
600 | 574 | =item $uri->path_segments |
601 | 575 | |
602 | 576 | =item $uri->path_segments( $segment, ... ) |
603 | 577 | |
604 | 578 | =begin original |
605 | 579 | |
606 | 580 | Sets and returns the path. In a scalar context, it returns |
607 | 581 | the same value as $uri->path. In a list context, it returns the |
608 | 582 | unescaped path segments that make up the path. Path segments that |
609 | 583 | have parameters are returned as an anonymous array. The first element |
610 | 584 | is the unescaped path segment proper; subsequent elements are escaped |
611 | 585 | parameter strings. Such an anonymous array uses overloading so it can |
612 | 586 | be treated as a string too, but this string does not include the |
613 | 587 | parameters. |
614 | 588 | |
615 | 589 | =end original |
616 | 590 | |
617 | 591 | path を設定し、返します。 |
618 | 592 | スカラコンテキストでは $uri->path と同じ値を返します。 |
619 | 593 | リストコンテキストでは path を構成するエスケープされない path セグメントを |
620 | 594 | 返します。 |
621 | 595 | パラメータを持っている path セグメントは無名配列として返されます。 |
622 | 596 | 最初の要素はエスケープされない path セグメントプロパーです; |
623 | 597 | 続く要素はエスケープされえたパラメータ文字列です。 |
624 | 598 | そのような無名配列は文字列としても扱うことが出来るようオーバーロードを |
625 | 599 | 使いますが、この文字列にはパラメータは含まれません。 |
626 | 600 | |
627 | 601 | =begin original |
628 | 602 | |
629 | 603 | Note that absolute paths have the empty string as their first |
630 | 604 | I<path_segment>, i.e. the I<path> C</foo/bar> have 3 |
631 | 605 | I<path_segments>; "", "foo" and "bar". |
632 | 606 | |
633 | 607 | =end original |
634 | 608 | |
635 | 609 | 絶対パスは最初の I<path_segment> として空文字列を持つことに注意してください; |
636 | 610 | つまり、I<path> C</foo/bar> は三つの I<path_segments> つまり |
637 | 611 | "", "foo", "bar" になることに注意してください。 |
638 | 612 | |
639 | 613 | =item $uri->query |
640 | 614 | |
641 | 615 | =item $uri->query( $new_query ) |
642 | 616 | |
643 | 617 | =begin original |
644 | 618 | |
645 | 619 | Sets and returns the escaped query component of |
646 | 620 | the $uri. |
647 | 621 | |
648 | 622 | =end original |
649 | 623 | |
650 | 624 | $uri のエスケープさえれた query 構成要素を設定し、返します。 |
651 | 625 | |
652 | 626 | =item $uri->query_form |
653 | 627 | |
654 | 628 | =item $uri->query_form( $key1 => $val1, $key2 => $val2, ... ) |
655 | 629 | |
656 | =item $uri->query_form( $key1 => $val1, $key2 => $val2, ..., $delim ) | |
657 | ||
658 | 630 | =item $uri->query_form( \@key_value_pairs ) |
659 | 631 | |
660 | =item $uri->query_form( \@key_value_pairs, $delim ) | |
661 | ||
662 | 632 | =item $uri->query_form( \%hash ) |
663 | 633 | |
664 | =item $uri->query_form( \%hash, $delim ) | |
665 | ||
666 | 634 | =begin original |
667 | 635 | |
668 | 636 | Sets and returns query components that use the |
669 | 637 | I<application/x-www-form-urlencoded> format. Key/value pairs are |
670 | 638 | separated by "&", and the key is separated from the value by a "=" |
671 | 639 | character. |
672 | 640 | |
673 | 641 | =end original |
674 | 642 | |
675 | 643 | I<application/x-www-form-urlencoded> 形式を使った query 構成要素を設定し、 |
676 | 644 | 返します。 |
677 | 645 | キー/値の組は "&" で分けられ、そのキーは値から "=" 文字で分けられます。 |
678 | 646 | |
679 | 647 | =begin original |
680 | 648 | |
681 | 649 | The form can be set either by passing separate key/value pairs, or via |
682 | 650 | an array or hash reference. Passing an empty array or an empty hash |
683 | 651 | removes the query component, whereas passing no arguments at all leaves |
684 | 652 | the component unchanged. The order of keys is undefined if a hash |
685 | 653 | reference is passed. The old value is always returned as a list of |
686 | 654 | separate key/value pairs. Assigning this list to a hash is unwise as |
687 | 655 | the keys returned might repeat. |
688 | 656 | |
689 | 657 | =end original |
690 | 658 | |
691 | ||
659 | The form can be set either by passing separate key/value pairs, or via | |
692 | ||
660 | an array or hash reference. Passing an empty array or an empty hash | |
693 | ||
661 | removes the query component, whereas passing no arguments at all leaves | |
694 | ||
662 | the component unchanged. The order of keys is undefined if a hash | |
695 | ||
663 | reference is passed. The old value is always returned as a list of | |
696 | ||
664 | separate key/value pairs. Assigning this list to a hash is unwise as | |
697 | ||
665 | the keys returned might repeat. | |
698 | ||
666 | (TBT) | |
699 | 667 | |
700 | 668 | =begin original |
701 | 669 | |
702 | 670 | The values passed when setting the form can be plain strings or |
703 | 671 | references to arrays of strings. Passing an array of values has the |
704 | 672 | same effect as passing the key repeatedly with one value at a time. |
705 | 673 | All the following statements have the same effect: |
706 | 674 | |
707 | 675 | =end original |
708 | 676 | |
709 | ||
677 | The values passed when setting the form can be plain strings or | |
710 | ||
678 | references to arrays of strings. Passing an array of values has the | |
711 | ||
679 | same effect as passing the key repeatedly with one value at a time. | |
712 | ||
680 | All the following statements have the same effect: | |
713 | ||
681 | (TBT) | |
714 | 682 | |
715 | 683 | $uri->query_form(foo => 1, foo => 2); |
716 | 684 | $uri->query_form(foo => [1, 2]); |
717 | 685 | $uri->query_form([ foo => 1, foo => 2 ]); |
718 | 686 | $uri->query_form([ foo => [1, 2] ]); |
719 | 687 | $uri->query_form({ foo => [1, 2] }); |
720 | 688 | |
721 | 689 | =begin original |
722 | 690 | |
723 | The $delim parameter can be passed as ";" to force the key/value pairs | |
724 | to be delimited by ";" instead of "&" in the query string. This | |
725 | practice is often recommended for URLs embedded in HTML or XML | |
726 | documents as this avoids the trouble of escaping the "&" character. | |
727 | You might also set the $URI::DEFAULT_QUERY_FORM_DELIMITER variable to | |
728 | ";" for the same global effect. | |
729 | ||
730 | =end original | |
731 | ||
732 | $delim 引数は、クエリ文字列内で "&" の代わりに ";" で | |
733 | キー/値の組を区切ることを強制するために、";" を渡せます。 | |
734 | この慣習は、"&" 文字をエスケープする問題を避けられるので、 | |
735 | HTML や XML 文書中の URL としてしばしば推奨されます。 | |
736 | 同じグローバルな効果を得るために | |
737 | $URI::DEFAULT_QUERY_FORM_DELIMITER 変数に ";" を設定するのもよいでしょう。 | |
738 | ||
739 | =begin original | |
740 | ||
741 | 691 | The C<URI::QueryParam> module can be loaded to add further methods to |
742 | 692 | manipulate the form of a URI. See L<URI::QueryParam> for details. |
743 | 693 | |
744 | 694 | =end original |
745 | 695 | |
746 | 696 | URI の形式を操作するためのさらなるメソッドを追加するために、 |
747 | 697 | C<URI::QueryParam> モジュールを読み込めます。 |
748 | 698 | 詳しくは L<URI::QueryParam> を参照してください。 |
749 | 699 | |
750 | 700 | =item $uri->query_keywords |
751 | 701 | |
752 | 702 | =item $uri->query_keywords( $keywords, ... ) |
753 | 703 | |
754 | 704 | =item $uri->query_keywords( \@keywords ) |
755 | 705 | |
756 | 706 | =begin original |
757 | 707 | |
758 | 708 | Sets and returns query components that use the |
759 | 709 | keywords separated by "+" format. |
760 | 710 | |
761 | 711 | =end original |
762 | 712 | |
763 | 713 | "+" により分けられるキーワードのフォーマットを使っている query 構成要素を |
764 | 714 | 設定し、返します。 |
765 | 715 | |
766 | 716 | =begin original |
767 | 717 | |
768 | 718 | The keywords can be set either by passing separate keywords directly |
769 | 719 | or by passing a reference to an array of keywords. Passing an empty |
770 | 720 | array removes the query component, whereas passing no arguments at |
771 | 721 | all leaves the component unchanged. The old value is always returned |
772 | 722 | as a list of separate words. |
773 | 723 | |
774 | 724 | =end original |
775 | 725 | |
776 | ||
726 | The keywords can be set either by passing separate keywords directly | |
777 | ||
727 | or by passing a reference to an array of keywords. Passing an empty | |
778 | ||
728 | array removes the query component, whereas passing no arguments at | |
779 | ||
729 | all leaves the component unchanged. The old value is always returned | |
780 | ||
730 | as a list of separate words. | |
731 | (TBT) | |
781 | 732 | |
782 | 733 | =back |
783 | 734 | |
784 | 735 | =head1 SERVER METHODS |
785 | 736 | |
786 | 737 | (サーバメソッド) |
787 | 738 | |
788 | 739 | =begin original |
789 | 740 | |
790 | 741 | For schemes where the I<authority> component denotes an Internet host, |
791 | 742 | the following methods are available in addition to the generic |
792 | 743 | methods. |
793 | 744 | |
794 | 745 | =end original |
795 | 746 | |
796 | 747 | I<authority> 構成要素がインターネットホストを示すスキームは汎用メソッドに |
797 | 748 | 加えて以下のメソッドを利用することが出来ます。 |
798 | 749 | |
799 | 750 | =over 4 |
800 | 751 | |
801 | 752 | =item $uri->userinfo |
802 | 753 | |
803 | 754 | =item $uri->userinfo( $new_userinfo ) |
804 | 755 | |
805 | 756 | =begin original |
806 | 757 | |
807 | 758 | Sets and returns the escaped userinfo part of the |
808 | 759 | authority component. |
809 | 760 | |
810 | 761 | =end original |
811 | 762 | |
812 | 763 | エスケープされた authority 構成要素の userinfo 部分を設定し、返します。 |
813 | 764 | |
814 | 765 | =begin original |
815 | 766 | |
816 | 767 | For some schemes this is a user name and a password separated by |
817 | 768 | a colon. This practice is not recommended. Embedding passwords in |
818 | 769 | clear text (such as URI) has proven to be a security risk in almost |
819 | 770 | every case where it has been used. |
820 | 771 | |
821 | 772 | =end original |
822 | 773 | |
823 | 774 | いくつかのスキームにとっては、コロンで区切られたこれはユーザ名と |
824 | 775 | パスワードになります。 |
825 | 776 | この実装は推奨されません。 |
826 | 777 | (URI のように) 平文に埋め込むことは、使うすべての場合において |
827 | 778 | セキュリティのリスクとなることが証明されています。 |
828 | 779 | |
829 | 780 | =item $uri->host |
830 | 781 | |
831 | 782 | =item $uri->host( $new_host ) |
832 | 783 | |
833 | 784 | =begin original |
834 | 785 | |
835 | 786 | Sets and returns the unescaped hostname. |
836 | 787 | |
837 | 788 | =end original |
838 | 789 | |
839 | 790 | エスケープされないホスト名を設定し、返します。 |
840 | 791 | |
841 | 792 | =begin original |
842 | 793 | |
843 | 794 | If the $new_host string ends with a colon and a number, then this |
844 | 795 | number also sets the port. |
845 | 796 | |
846 | 797 | =end original |
847 | 798 | |
848 | 799 | $new_host 文字列がコロンと数字で終わっていれば、この番号はポートを |
849 | 800 | 設定します。 |
850 | 801 | |
851 | =begin original | |
852 | ||
853 | For IPv6 addresses the brackets around the raw address is removed in the return | |
854 | value from $uri->host. When setting the host attribute to an IPv6 address you | |
855 | can use a raw address or one enclosed in brackets. The address needs to be | |
856 | enclosed in brackets if you want to pass in a new port value as well. | |
857 | ||
858 | =end original | |
859 | ||
860 | IPv6 アドレスのために、$uri->host の返り値では生アドレスの周りの | |
861 | 大かっこは削除されます。 | |
862 | host 属性に IPv6 アドレスを設定するとき、 | |
863 | 生のアドレスと一つの大かっこで囲まれたものを使えます。 | |
864 | 新しいポート値も渡したいときは、アドレスは大かっこで囲まれる必要があります。 | |
865 | ||
866 | =item $uri->ihost | |
867 | ||
868 | =begin original | |
869 | ||
870 | Returns the host in Unicode form. Any IDNA A-labels are turned into U-labels. | |
871 | ||
872 | =end original | |
873 | ||
874 | Unicode 形式でホストを帰します。 | |
875 | IDNA A ラベルは U ラベルに変えられます。 | |
876 | ||
877 | 802 | =item $uri->port |
878 | 803 | |
879 | 804 | =item $uri->port( $new_port ) |
880 | 805 | |
881 | 806 | =begin original |
882 | 807 | |
883 | 808 | Sets and returns the port. The port is a simple integer |
884 | 809 | that should be greater than 0. |
885 | 810 | |
886 | 811 | =end original |
887 | 812 | |
888 | 813 | ポートを設定し、返します。 |
889 | 814 | ポートは 0 より大きくなければならない単純な整数です。 |
890 | 815 | |
891 | 816 | =begin original |
892 | 817 | |
893 | 818 | If a port is not specified explicitly in the URI, then the URI scheme's default port |
894 | 819 | is returned. If you don't want the default port |
895 | 820 | substituted, then you can use the $uri->_port method instead. |
896 | 821 | |
897 | 822 | =end original |
898 | 823 | |
899 | 824 | URI で明確にポートが指定されなければ、URI スキームのデフォルトのポートが |
900 | 825 | 返されます。 |
901 | 826 | デフォルトのポートへの置換をして欲しくないのであれば、$uri->_port メソッドを |
902 | 827 | 代りに使うことが出来ます。 |
903 | 828 | |
904 | 829 | =item $uri->host_port |
905 | 830 | |
906 | 831 | =item $uri->host_port( $new_host_port ) |
907 | 832 | |
908 | 833 | =begin original |
909 | 834 | |
910 | 835 | Sets and returns the host and port as a single |
911 | 836 | unit. The returned value includes a port, even if it matches the |
912 | 837 | default port. The host part and the port part are separated by a |
913 | 838 | colon: ":". |
914 | 839 | |
915 | 840 | =end original |
916 | 841 | |
917 | 842 | ホストとポートを一つの単位として設定し、返します。 |
918 | 843 | デフォルトのポートにマッチしていても、返される値にはポートも含まれます。 |
919 | 844 | ホスト部分とポート部分はコロン ":" で区切られます。 |
920 | 845 | |
921 | =begin original | |
922 | ||
923 | For IPv6 addresses the bracketing is preserved; thus | |
924 | URI->new("http://[::1]/")->host_port returns "[::1]:80". Contrast this with | |
925 | $uri->host which will remove the brackets. | |
926 | ||
927 | =end original | |
928 | ||
929 | IPv6 アドレスのために、大かっこは保存されます; 従って、 | |
930 | URI->new("http://[::1]/")->host_port は "[::1]:80" を返します。 | |
931 | これは、大かっこを取り除く $uri->host と異なります。 | |
932 | ||
933 | 846 | =item $uri->default_port |
934 | 847 | |
935 | 848 | =begin original |
936 | 849 | |
937 | 850 | Returns the default port of the URI scheme to which $uri |
938 | 851 | belongs. For I<http> this is the number 80, for I<ftp> this |
939 | 852 | is the number 21, etc. The default port for a scheme can not be |
940 | 853 | changed. |
941 | 854 | |
942 | 855 | =end original |
943 | 856 | |
944 | 857 | $uri が所属する URI スキームのデフォルトポートを返します。 |
945 | 858 | I<http> では番号 80 になり、 |
946 | 859 | I<ftp> では番号 21 になります。 |
947 | 860 | スキームのためのデフォルトポートは変更できません。 |
948 | 861 | |
949 | 862 | =back |
950 | 863 | |
951 | 864 | =head1 SCHEME-SPECIFIC SUPPORT |
952 | 865 | |
953 | 866 | (スキーム特有サポート) |
954 | 867 | |
955 | 868 | =begin original |
956 | 869 | |
957 | 870 | Scheme-specific support is provided for the following URI schemes. For C<URI> |
958 | 871 | objects that do not belong to one of these, you can only use the common and |
959 | 872 | generic methods. |
960 | 873 | |
961 | 874 | =end original |
962 | 875 | |
963 | 876 | 以下の URI スキームはスキーム固有のサポートが提供されています。 |
964 | 877 | これらのうちの一つに所属していない C<URI> オブジェクトでは、共通と |
965 | 878 | 汎用メソッドしか使えません。 |
966 | 879 | |
967 | 880 | =over 4 |
968 | 881 | |
969 | 882 | =item B<data>: |
970 | 883 | |
971 | 884 | =begin original |
972 | 885 | |
973 | 886 | The I<data> URI scheme is specified in RFC 2397. It allows inclusion |
974 | 887 | of small data items as "immediate" data, as if it had been included |
975 | 888 | externally. |
976 | 889 | |
977 | 890 | =end original |
978 | 891 | |
979 | 892 | I<data> URI スキームは RFC2397 で定義されています。 |
980 | 893 | これはまるで外部に含まれているかのように、小さなデータ要素を |
981 | 894 | "immediate" データとして含むことを許しています。 |
982 | 895 | |
983 | 896 | =begin original |
984 | 897 | |
985 | 898 | C<URI> objects belonging to the data scheme support the common methods |
986 | 899 | and two new methods to access their scheme-specific components: |
987 | 900 | $uri->media_type and $uri->data. See L<URI::data> for details. |
988 | 901 | |
989 | 902 | =end original |
990 | 903 | |
991 | data スキームに属する C<URI> オブジェクトは共通メソッドと、スキーム特有の | |
904 | data スキームに所属する C<URI> オブジェクトは共通メソッドと、スキーム特有の | |
992 | 905 | 構成要素にアクセスするための2つの新しいメソッド; $uri->media_type と |
993 | 906 | $uri->data をサポートします。 |
994 | 907 | 詳細は L<URI::data> を参照してください。 |
995 | 908 | |
996 | 909 | =item B<file>: |
997 | 910 | |
998 | 911 | =begin original |
999 | 912 | |
1000 | 913 | An old specification of the I<file> URI scheme is found in RFC 1738. |
1001 | 914 | A new RFC 2396 based specification in not available yet, but file URI |
1002 | 915 | references are in common use. |
1003 | 916 | |
1004 | 917 | =end original |
1005 | 918 | |
1006 | 919 | B<file> URI スキームの古い仕様は RFC 1738 にあります。 |
1007 | 920 | 新しい RFC 2396 をベースとした仕様はまだ利用できませんが、file URI |
1008 | 921 | リファレンスは共通に使えます。 |
1009 | 922 | |
1010 | 923 | =begin original |
1011 | 924 | |
1012 | 925 | C<URI> objects belonging to the file scheme support the common and |
1013 | 926 | generic methods. In addition, they provide two methods for mapping file URIs |
1014 | 927 | back to local file names; $uri->file and $uri->dir. See L<URI::file> |
1015 | 928 | for details. |
1016 | 929 | |
1017 | 930 | =end original |
1018 | 931 | |
1019 | file スキームに属する C<URI> オブジェクトは共通と汎用のメソッドを | |
932 | file スキームに所属する C<URI> オブジェクトは共通と汎用のメソッドを | |
1020 | 933 | サポートします。 |
1021 | 934 | さらに file URI とローカルファイル名をマッピングする二つのメソッド; |
1022 | 935 | $uri->file, $uri->dir を提供します。 |
1023 | 936 | 詳細は L<URI::file> を参照してください。 |
1024 | 937 | |
1025 | 938 | =item B<ftp>: |
1026 | 939 | |
1027 | 940 | =begin original |
1028 | 941 | |
1029 | 942 | An old specification of the I<ftp> URI scheme is found in RFC 1738. A |
1030 | 943 | new RFC 2396 based specification in not available yet, but ftp URI |
1031 | 944 | references are in common use. |
1032 | 945 | |
1033 | 946 | =end original |
1034 | 947 | |
1035 | 948 | I<ftp> URI スキームの古い仕様は RFC 1738 にあります。 |
1036 | 949 | 新しい RFC 2396 をベースとした仕様はまだ利用できませんが、ftp URI |
1037 | 950 | リファレンスは共通に使えます。 |
1038 | 951 | |
1039 | 952 | =begin original |
1040 | 953 | |
1041 | 954 | C<URI> objects belonging to the ftp scheme support the common, |
1042 | 955 | generic and server methods. In addition, they provide two methods for |
1043 | 956 | accessing the userinfo sub-components: $uri->user and $uri->password. |
1044 | 957 | |
1045 | 958 | =end original |
1046 | 959 | |
1047 | ftp スキームに属する C<URI> オブジェクトは共通、汎用、サーバーの | |
960 | ftp スキームに所属する C<URI> オブジェクトは共通、汎用、サーバーの | |
1048 | 961 | メソッドをサポートします。 |
1049 | 962 | さらに userinfo にアクセスするための二つのメソッド; |
1050 | 963 | $uri->user, $uri->password を提供します。 |
1051 | 964 | |
1052 | 965 | =item B<gopher>: |
1053 | 966 | |
1054 | 967 | =begin original |
1055 | 968 | |
1056 | 969 | The I<gopher> URI scheme is specified in |
1057 | 970 | <draft-murali-url-gopher-1996-12-04> and will hopefully be available |
1058 | 971 | as a RFC 2396 based specification. |
1059 | 972 | |
1060 | 973 | =end original |
1061 | 974 | |
1062 | 975 | I<gopher> URI スキームは <draft-murali-url-gopher-1996-12-04> で定義され、 |
1063 | 976 | RFC 2396 ベース仕様として利用できる見込みです。 |
1064 | 977 | |
1065 | 978 | =begin original |
1066 | 979 | |
1067 | 980 | C<URI> objects belonging to the gopher scheme support the common, |
1068 | 981 | generic and server methods. In addition, they support some methods for |
1069 | 982 | accessing gopher-specific path components: $uri->gopher_type, |
1070 | 983 | $uri->selector, $uri->search, $uri->string. |
1071 | 984 | |
1072 | 985 | =end original |
1073 | 986 | |
1074 | gopher スキームに属する C<URI> オブジェクトは共通、汎用、そして | |
987 | gopher スキームに所属する C<URI> オブジェクトは共通、汎用、そして | |
1075 | 988 | サーバメソッドをサポートします。 |
1076 | 989 | さらに gopher 特有の path 構成要素にアクセスするためのメソッドを |
1077 | 990 | サポートします: |
1078 | 991 | $uri->gopher_type, $uri->selector, $uri->search, $uri->string. |
1079 | 992 | |
1080 | 993 | =item B<http>: |
1081 | 994 | |
1082 | 995 | =begin original |
1083 | 996 | |
1084 | 997 | The I<http> URI scheme is specified in RFC 2616. |
1085 | 998 | The scheme is used to reference resources hosted by HTTP servers. |
1086 | 999 | |
1087 | 1000 | =end original |
1088 | 1001 | |
1089 | 1002 | I<http> URI スキームは RFC 2616 で定義されています。 |
1090 | 1003 | このスキームは HTTP サーバによりホストされる参照リソースとして使われます。 |
1091 | 1004 | |
1092 | 1005 | =begin original |
1093 | 1006 | |
1094 | 1007 | C<URI> objects belonging to the http scheme support the common, |
1095 | 1008 | generic and server methods. |
1096 | 1009 | |
1097 | 1010 | =end original |
1098 | 1011 | |
1099 | http スキームに属する C<URI> オブジェクトは共通、汎用そして | |
1012 | http スキームに所属する C<URI> オブジェクトは共通、汎用そして | |
1100 | 1013 | サーバメソッドをサポートします。 |
1101 | 1014 | |
1102 | 1015 | =item B<https>: |
1103 | 1016 | |
1104 | 1017 | =begin original |
1105 | 1018 | |
1106 | 1019 | The I<https> URI scheme is a Netscape invention which is commonly |
1107 | 1020 | implemented. The scheme is used to reference HTTP servers through SSL |
1108 | 1021 | connections. Its syntax is the same as http, but the default |
1109 | 1022 | port is different. |
1110 | 1023 | |
1111 | 1024 | =end original |
1112 | 1025 | |
1113 | 1026 | I<https> URI スキームは Netscape が提案し、一般的に実装されています。 |
1114 | 1027 | このスキームは SSL 接続を通した HTTP サーバ参照のために使われます。 |
1115 | 1028 | その書式は http と同じですが、デフォルトポートは違います。 |
1116 | 1029 | |
1117 | 1030 | =item B<ldap>: |
1118 | 1031 | |
1119 | 1032 | =begin original |
1120 | 1033 | |
1121 | 1034 | The I<ldap> URI scheme is specified in RFC 2255. LDAP is the |
1122 | 1035 | Lightweight Directory Access Protocol. An ldap URI describes an LDAP |
1123 | 1036 | search operation to perform to retrieve information from an LDAP |
1124 | 1037 | directory. |
1125 | 1038 | |
1126 | 1039 | =end original |
1127 | 1040 | |
1128 | 1041 | I<ldap> URI スキームは RFC 2255 で定義されます。 |
1129 | 1042 | LDAP は軽量ディレクトリアクセスプロトコル |
1130 | 1043 | (Lightweight Directory Access Protocol)です。 |
1131 | 1044 | ldap URI は LDAP ディレクトリから情報を取り出すために実行する LDAP 検索操作を |
1132 | 1045 | 記述します。 |
1133 | 1046 | |
1134 | 1047 | =begin original |
1135 | 1048 | |
1136 | 1049 | C<URI> objects belonging to the ldap scheme support the common, |
1137 | 1050 | generic and server methods as well as ldap-specific methods: $uri->dn, |
1138 | 1051 | $uri->attributes, $uri->scope, $uri->filter, $uri->extensions. See |
1139 | 1052 | L<URI::ldap> for details. |
1140 | 1053 | |
1141 | 1054 | =end original |
1142 | 1055 | |
1143 | ldap スキームに属する C<URI> オブジェクトは共通、汎用、サーバメソッドと | |
1056 | ldap スキームに所属する C<URI> オブジェクトは共通、汎用、サーバメソッドと | |
1144 | 1057 | ldap 固有のメソッドをサポートします: |
1145 | 1058 | $uri->dn, $uri->attributes, $uri->scope, $uri->filter, $uri->extensions。 |
1146 | 1059 | 詳細は L<URI::ldap> を参照してください。 |
1147 | 1060 | |
1148 | 1061 | =item B<ldapi>: |
1149 | 1062 | |
1150 | 1063 | =begin original |
1151 | 1064 | |
1152 | 1065 | Like the I<ldap> URI scheme, but uses a UNIX domain socket. The |
1153 | 1066 | server methods are not supported, and the local socket path is |
1154 | 1067 | available as $uri->un_path. The I<ldapi> scheme is used by the |
1155 | 1068 | OpenLDAP package. There is no real specification for it, but it is |
1156 | 1069 | mentioned in various OpenLDAP manual pages. |
1157 | 1070 | |
1158 | 1071 | =end original |
1159 | 1072 | |
1160 | 1073 | I<ldap> URI スキームと同様ですが、UNIX ドメインソケットを使います。 |
1161 | 1074 | サーバメソッドは非対応で、ローカルソケットパスは $uri->un_path で |
1162 | 1075 | 利用可能です。 |
1163 | 1076 | I<ldapi> スキームは OpenLDAP パッケージで使われています。 |
1164 | 1077 | これに関する実際の仕様はありませんが、様々な OpenLDAP マニュアルページで |
1165 | 1078 | 言及されています。 |
1166 | 1079 | |
1167 | 1080 | =item B<ldaps>: |
1168 | 1081 | |
1169 | 1082 | =begin original |
1170 | 1083 | |
1171 | 1084 | Like the I<ldap> URI scheme, but uses an SSL connection. This |
1172 | 1085 | scheme is deprecated, as the preferred way is to use the I<start_tls> |
1173 | 1086 | mechanism. |
1174 | 1087 | |
1175 | 1088 | =end original |
1176 | 1089 | |
1177 | 1090 | I<ldap> URI スキームと同様ですが、SSL 接続を使います。 |
1178 | 1091 | このスキームは非推奨です; 好ましい方法は I<start_tls> 機構を使うことです。 |
1179 | 1092 | |
1180 | 1093 | =item B<mailto>: |
1181 | 1094 | |
1182 | 1095 | =begin original |
1183 | 1096 | |
1184 | 1097 | The I<mailto> URI scheme is specified in RFC 2368. The scheme was |
1185 | 1098 | originally used to designate the Internet mailing address of an |
1186 | 1099 | individual or service. It has (in RFC 2368) been extended to allow |
1187 | 1100 | setting of other mail header fields and the message body. |
1188 | 1101 | |
1189 | 1102 | =end original |
1190 | 1103 | |
1191 | 1104 | I<mailto> URI スキームは RFC 2368 で定義されています。 |
1192 | 1105 | スキームは元はインターネットメーリングアドレスを示すために使われました。 |
1193 | 1106 | それは(RFC 2368 で)他のメールヘッダフィールドとメッセージボディの設定を |
1194 | 1107 | 許すように拡張されています。 |
1195 | 1108 | |
1196 | 1109 | =begin original |
1197 | 1110 | |
1198 | 1111 | C<URI> objects belonging to the mailto scheme support the common |
1199 | 1112 | methods and the generic query methods. In addition, they support the |
1200 | 1113 | following mailto-specific methods: $uri->to, $uri->headers. |
1201 | 1114 | |
1202 | 1115 | =end original |
1203 | 1116 | |
1204 | mailto スキームに属する C<URI> オブジェクトは共通メソッドと汎用の | |
1117 | mailto スキームに所属する C<URI> オブジェクトは共通メソッドと汎用の | |
1205 | 1118 | 問い合わせメソッドをサポートします。 |
1206 | 1119 | さらに以下の mailto 独自のメソッドもサポートします: |
1207 | 1120 | $uri->to, $uri->headers。 |
1208 | 1121 | |
1209 | =begin original | |
1210 | ||
1211 | Note that the "foo@example.com" part of a mailto is I<not> the | |
1212 | C<userinfo> and C<host> but instead the C<path>. This allows a | |
1213 | mailto URI to contain multiple comma separated email addresses. | |
1214 | ||
1215 | =end original | |
1216 | ||
1217 | mailto の "foo@example.com" 部分は C<userinfo> と C<host> I<ではなく> | |
1218 | C<path> であることに注意してください。 | |
1219 | これにより、mailto URI にカンマ区切りで複数の電子メールアドレスを | |
1220 | 含むことができます。 | |
1221 | ||
1222 | 1122 | =item B<mms>: |
1223 | 1123 | |
1224 | 1124 | =begin original |
1225 | 1125 | |
1226 | The I<mms> URL specification can be found at L<http://sdp.ppona.com/> | |
1126 | The I<mms> URL specification can be found at L<http://sdp.ppona.com/> | |
1227 | 1127 | C<URI> objects belonging to the mms scheme support the common, |
1228 | 1128 | generic, and server methods, with the exception of userinfo and |
1229 | 1129 | query-related sub-components. |
1230 | 1130 | |
1231 | 1131 | =end original |
1232 | 1132 | |
1233 | I<mms> URL | |
1133 | The I<mms> URL specification can be found at L<http://sdp.ppona.com/> | |
1234 | ||
1134 | C<URI> objects belonging to the mms scheme support the common, | |
1235 | ||
1135 | generic, and server methods, with the exception of userinfo and | |
1236 | ||
1136 | query-related sub-components. | |
1137 | (TBT) | |
1237 | 1138 | |
1238 | 1139 | =item B<news>: |
1239 | 1140 | |
1240 | 1141 | =begin original |
1241 | 1142 | |
1242 | 1143 | The I<news>, I<nntp> and I<snews> URI schemes are specified in |
1243 | 1144 | <draft-gilman-news-url-01> and will hopefully be available as an RFC |
1244 | 1145 | 2396 based specification soon. |
1245 | 1146 | |
1246 | 1147 | =end original |
1247 | 1148 | |
1248 | 1149 | I<news>, I<nntp>, I<snews> URI スキームは <draft-gilman-news-url-01> で |
1249 | 1150 | 定義され、RFC 2396 ベース仕様として使えるようになる見込みです。 |
1250 | 1151 | |
1251 | 1152 | =begin original |
1252 | 1153 | |
1253 | 1154 | C<URI> objects belonging to the news scheme support the common, |
1254 | 1155 | generic and server methods. In addition, they provide some methods to |
1255 | 1156 | access the path: $uri->group and $uri->message. |
1256 | 1157 | |
1257 | 1158 | =end original |
1258 | 1159 | |
1259 | news スキームに属する C<URI> オブジェクトは、 | |
1160 | news スキームに所属する C<URI> オブジェクトは共通、汎用そして | |
1260 | ||
1161 | サーバメソッドをサポートします。 | |
1261 | 1162 | さらに path にアクセスするためのいくつかのメソッドも提供します: |
1262 | 1163 | $uri->group, $uri->message |
1263 | 1164 | |
1264 | 1165 | =item B<nntp>: |
1265 | 1166 | |
1266 | 1167 | =begin original |
1267 | 1168 | |
1268 | 1169 | See I<news> scheme. |
1269 | 1170 | |
1270 | 1171 | =end original |
1271 | 1172 | |
1272 | 1173 | I<news> スキームを参照してください。 |
1273 | 1174 | |
1274 | 1175 | =item B<pop>: |
1275 | 1176 | |
1276 | 1177 | =begin original |
1277 | 1178 | |
1278 | 1179 | The I<pop> URI scheme is specified in RFC 2384. The scheme is used to |
1279 | 1180 | reference a POP3 mailbox. |
1280 | 1181 | |
1281 | 1182 | =end original |
1282 | 1183 | |
1283 | 1184 | I<pop> URI スキームは RFC 2384 で定義されます。 |
1284 | 1185 | スキームは POP3 メールボックスの参照に使われます。 |
1285 | 1186 | |
1286 | 1187 | =begin original |
1287 | 1188 | |
1288 | 1189 | C<URI> objects belonging to the pop scheme support the common, generic |
1289 | 1190 | and server methods. In addition, they provide two methods to access the |
1290 | 1191 | userinfo components: $uri->user and $uri->auth |
1291 | 1192 | |
1292 | 1193 | =end original |
1293 | 1194 | |
1294 | pop スキームに属する C<URI> オブジェクトは、 | |
1195 | pop スキームに所属する C<URI> オブジェクトは共通、汎用、そして | |
1295 | ||
1196 | サーバメソッドをサポートします。 | |
1296 | 1197 | さらに userinfo 構成要素にアクセスするための2つのメソッドを提供します: |
1297 | 1198 | $uri->user, $uri->auth |
1298 | 1199 | |
1299 | 1200 | =item B<rlogin>: |
1300 | 1201 | |
1301 | 1202 | =begin original |
1302 | 1203 | |
1303 | 1204 | An old specification of the I<rlogin> URI scheme is found in RFC |
1304 | 1205 | 1738. C<URI> objects belonging to the rlogin scheme support the |
1305 | 1206 | common, generic and server methods. |
1306 | 1207 | |
1307 | 1208 | =end original |
1308 | 1209 | |
1309 | 1210 | I<rlogin> URI スキームの古い仕様は RFC 1738 にあります。 |
1310 | rlogin スキームに属する C<URI> オブジェクトは、 | |
1211 | rlogin スキームに所属する C<URI> オブジェクトは共通、汎用、サーバメソッドを | |
1311 | ||
1212 | サポートします。 | |
1312 | 1213 | |
1313 | 1214 | =item B<rtsp>: |
1314 | 1215 | |
1315 | 1216 | =begin original |
1316 | 1217 | |
1317 | 1218 | The I<rtsp> URL specification can be found in section 3.2 of RFC 2326. |
1318 | 1219 | C<URI> objects belonging to the rtsp scheme support the common, |
1319 | 1220 | generic, and server methods, with the exception of userinfo and |
1320 | 1221 | query-related sub-components. |
1321 | 1222 | |
1322 | 1223 | =end original |
1323 | 1224 | |
1324 | I<rtsp> URL | |
1225 | The I<rtsp> URL specification can be found in section 3.2 of RFC 2326. | |
1325 | ||
1226 | C<URI> objects belonging to the rtsp scheme support the common, | |
1326 | ||
1227 | generic, and server methods, with the exception of userinfo and | |
1228 | query-related sub-components. | |
1229 | (TBT) | |
1327 | 1230 | |
1328 | 1231 | =item B<rtspu>: |
1329 | 1232 | |
1330 | 1233 | =begin original |
1331 | 1234 | |
1332 | 1235 | The I<rtspu> URI scheme is used to talk to RTSP servers over UDP |
1333 | 1236 | instead of TCP. The syntax is the same as rtsp. |
1334 | 1237 | |
1335 | 1238 | =end original |
1336 | 1239 | |
1337 | I<rtspu> URI | |
1240 | The I<rtspu> URI scheme is used to talk to RTSP servers over UDP | |
1338 | ||
1241 | instead of TCP. The syntax is the same as rtsp. | |
1339 | ||
1242 | (TBT) | |
1340 | 1243 | |
1341 | 1244 | =item B<rsync>: |
1342 | 1245 | |
1343 | 1246 | =begin original |
1344 | 1247 | |
1345 | Information about rsync is available from | |
1248 | Information about rsync is available from http://rsync.samba.org. | |
1346 | 1249 | C<URI> objects belonging to the rsync scheme support the common, |
1347 | 1250 | generic and server methods. In addition, they provide methods to |
1348 | 1251 | access the userinfo sub-components: $uri->user and $uri->password. |
1349 | 1252 | |
1350 | 1253 | =end original |
1351 | 1254 | |
1352 | rsync | |
1255 | Information about rsync is available from http://rsync.samba.org. | |
1353 | ||
1256 | C<URI> objects belonging to the rsync scheme support the common, | |
1354 | ||
1257 | generic and server methods. In addition, they provide methods to | |
1355 | ||
1258 | access the userinfo sub-components: $uri->user and $uri->password. | |
1356 | ||
1259 | (TBT) | |
1357 | 1260 | |
1358 | 1261 | =item B<sip>: |
1359 | 1262 | |
1360 | 1263 | =begin original |
1361 | 1264 | |
1362 | 1265 | The I<sip> URI specification is described in sections 19.1 and 25 |
1363 | 1266 | of RFC 3261. C<URI> objects belonging to the sip scheme support the |
1364 | 1267 | common, generic, and server methods with the exception of path related |
1365 | 1268 | sub-components. In addition, they provide two methods to get and set |
1366 | 1269 | I<sip> parameters: $uri->params_form and $uri->params. |
1367 | 1270 | |
1368 | 1271 | =end original |
1369 | 1272 | |
1370 | I<sip> URI | |
1273 | The I<sip> URI specification is described in sections 19.1 and 25 | |
1371 | ||
1274 | of RFC 3261. C<URI> objects belonging to the sip scheme support the | |
1372 | ||
1275 | common, generic, and server methods with the exception of path related | |
1373 | ||
1276 | sub-components. In addition, they provide two methods to get and set | |
1374 | ||
1277 | I<sip> parameters: $uri->params_form and $uri->params. | |
1278 | (TBT) | |
1375 | 1279 | |
1376 | 1280 | =item B<sips>: |
1377 | 1281 | |
1378 | 1282 | =begin original |
1379 | 1283 | |
1380 | 1284 | See I<sip> scheme. Its syntax is the same as sip, but the default |
1381 | 1285 | port is different. |
1382 | 1286 | |
1383 | 1287 | =end original |
1384 | 1288 | |
1385 | I<sip> | |
1289 | See I<sip> scheme. Its syntax is the same as sip, but the default | |
1386 | ||
1290 | port is different. | |
1291 | (TBT) | |
1387 | 1292 | |
1388 | 1293 | =item B<snews>: |
1389 | 1294 | |
1390 | 1295 | =begin original |
1391 | 1296 | |
1392 | 1297 | See I<news> scheme. Its syntax is the same as news, but the default |
1393 | 1298 | port is different. |
1394 | 1299 | |
1395 | 1300 | =end original |
1396 | 1301 | |
1397 | 1302 | I<news> スキームを参照してください。 |
1398 | その | |
1303 | その書式は news と同じですが、デフォルトポートは違います。 | |
1399 | 1304 | |
1400 | 1305 | =item B<telnet>: |
1401 | 1306 | |
1402 | 1307 | =begin original |
1403 | 1308 | |
1404 | 1309 | An old specification of the I<telnet> URI scheme is found in RFC |
1405 | 1310 | 1738. C<URI> objects belonging to the telnet scheme support the |
1406 | 1311 | common, generic and server methods. |
1407 | 1312 | |
1408 | 1313 | =end original |
1409 | 1314 | |
1410 | 1315 | I<telnet> URI スキームの古い仕様は RFC 1738 にあります。 |
1411 | telnet スキームに属する C<URI> オブジェクトは、 | |
1316 | telnet スキームに所属する C<URI> オブジェクトは共通、汎用そして | |
1412 | ||
1317 | サーバメソッドをサポートします。 | |
1413 | 1318 | |
1414 | 1319 | =item B<tn3270>: |
1415 | 1320 | |
1416 | 1321 | =begin original |
1417 | 1322 | |
1418 | 1323 | These URIs are used like I<telnet> URIs but for connections to IBM |
1419 | 1324 | mainframes. C<URI> objects belonging to the tn3270 scheme support the |
1420 | 1325 | common, generic and server methods. |
1421 | 1326 | |
1422 | 1327 | =end original |
1423 | 1328 | |
1424 | ||
1329 | These URIs are used like I<telnet> URIs but for connections to IBM | |
1425 | I | |
1330 | mainframes. C<URI> objects belonging to the tn3270 scheme support the | |
1426 | ||
1331 | common, generic and server methods. | |
1427 | ||
1332 | (TBT) | |
1428 | 1333 | |
1429 | 1334 | =item B<ssh>: |
1430 | 1335 | |
1431 | 1336 | =begin original |
1432 | 1337 | |
1433 | Information about ssh is available at | |
1338 | Information about ssh is available at http://www.openssh.com/. | |
1434 | 1339 | C<URI> objects belonging to the ssh scheme support the common, |
1435 | 1340 | generic and server methods. In addition, they provide methods to |
1436 | 1341 | access the userinfo sub-components: $uri->user and $uri->password. |
1437 | 1342 | |
1438 | 1343 | =end original |
1439 | 1344 | |
1440 | ssh | |
1345 | Information about ssh is available at http://www.openssh.com/. | |
1441 | ||
1346 | C<URI> objects belonging to the ssh scheme support the common, | |
1442 | ||
1347 | generic and server methods. In addition, they provide methods to | |
1443 | ||
1348 | access the userinfo sub-components: $uri->user and $uri->password. | |
1444 | ||
1349 | (TBT) | |
1445 | 1350 | |
1446 | 1351 | =item B<urn>: |
1447 | 1352 | |
1448 | 1353 | =begin original |
1449 | 1354 | |
1450 | 1355 | The syntax of Uniform Resource Names is specified in RFC 2141. C<URI> |
1451 | 1356 | objects belonging to the urn scheme provide the common methods, and also the |
1452 | 1357 | methods $uri->nid and $uri->nss, which return the Namespace Identifier |
1453 | 1358 | and the Namespace-Specific String respectively. |
1454 | 1359 | |
1455 | 1360 | =end original |
1456 | 1361 | |
1457 | The syntax of Uniform Resource Names is specified in RFC 2141. | |
1362 | The syntax of Uniform Resource Names is specified in RFC 2141. C<URI> | |
1458 | ssh | |
1363 | objects belonging to the urn scheme provide the common methods, and also the | |
1459 | ||
1364 | methods $uri->nid and $uri->nss, which return the Namespace Identifier | |
1460 | ||
1365 | and the Namespace-Specific String respectively. | |
1461 | ||
1366 | (TBT) | |
1462 | 1367 | |
1463 | 1368 | =begin original |
1464 | 1369 | |
1465 | 1370 | The Namespace Identifier basically works like the Scheme identifier of |
1466 | 1371 | URIs, and further divides the URN namespace. Namespace Identifier |
1467 | 1372 | assignments are maintained at |
1468 | ||
1373 | <http://www.iana.org/assignments/urn-namespaces>. | |
1469 | 1374 | |
1470 | 1375 | =end original |
1471 | 1376 | |
1472 | Namespace Identifier | |
1377 | The Namespace Identifier basically works like the Scheme identifier of | |
1473 | ||
1378 | URIs, and further divides the URN namespace. Namespace Identifier | |
1474 | ||
1379 | assignments are maintained at | |
1475 | ||
1380 | <http://www.iana.org/assignments/urn-namespaces>. | |
1476 | ||
1381 | (TBT) | |
1477 | 1382 | |
1478 | 1383 | =begin original |
1479 | 1384 | |
1480 | 1385 | Letter case is not significant for the Namespace Identifier. It is |
1481 | 1386 | always returned in lower case by the $uri->nid method. The $uri->_nid |
1482 | 1387 | method can be used if you want it in its original case. |
1483 | 1388 | |
1484 | 1389 | =end original |
1485 | 1390 | |
1486 | Namespace Identifier | |
1391 | Letter case is not significant for the Namespace Identifier. It is | |
1487 | $uri->nid | |
1392 | always returned in lower case by the $uri->nid method. The $uri->_nid | |
1488 | ||
1393 | method can be used if you want it in its original case. | |
1489 | ||
1394 | (TBT) | |
1490 | 1395 | |
1491 | 1396 | =item B<urn>:B<isbn>: |
1492 | 1397 | |
1493 | 1398 | =begin original |
1494 | 1399 | |
1495 | 1400 | The C<urn:isbn:> namespace contains International Standard Book |
1496 | 1401 | Numbers (ISBNs) and is described in RFC 3187. A C<URI> object belonging |
1497 | 1402 | to this namespace has the following extra methods (if the |
1498 | 1403 | Business::ISBN module is available): $uri->isbn, |
1499 | $uri->isbn_publisher_code, $uri->isbn_ | |
1404 | $uri->isbn_publisher_code, $uri->isbn_country_code, $uri->isbn_as_ean. | |
1500 | which is still supported by issues a deprecation warning), $uri->isbn_as_ean. | |
1501 | 1405 | |
1502 | 1406 | =end original |
1503 | 1407 | |
1504 | The C<urn:isbn:> | |
1408 | The C<urn:isbn:> namespace contains International Standard Book | |
1505 | RFC 3187 | |
1409 | Numbers (ISBNs) and is described in RFC 3187. A C<URI> object belonging | |
1506 | ||
1410 | to this namespace has the following extra methods (if the | |
1507 | ||
1411 | Business::ISBN module is available): $uri->isbn, | |
1508 | $uri->isbn, | |
1412 | $uri->isbn_publisher_code, $uri->isbn_country_code, $uri->isbn_as_ean. | |
1509 | ||
1413 | (TBT) | |
1510 | (以前は isbn_country_code でした; 廃止予定警告付きで今でも対応しています), | |
1511 | $uri->isbn_as_ean。 | |
1512 | 1414 | |
1513 | 1415 | =item B<urn>:B<oid>: |
1514 | 1416 | |
1515 | 1417 | =begin original |
1516 | 1418 | |
1517 | 1419 | The C<urn:oid:> namespace contains Object Identifiers (OIDs) and is |
1518 | 1420 | described in RFC 3061. An object identifier consists of sequences of digits |
1519 | 1421 | separated by dots. A C<URI> object belonging to this namespace has an |
1520 | 1422 | additional method called $uri->oid that can be used to get/set the oid |
1521 | 1423 | value. In a list context, oid numbers are returned as separate elements. |
1522 | 1424 | |
1523 | 1425 | =end original |
1524 | 1426 | |
1525 | C<urn:oid:> | |
1427 | The C<urn:oid:> namespace contains Object Identifiers (OIDs) and is | |
1526 | RFC 3061 | |
1428 | described in RFC 3061. An object identifier consists of sequences of digits | |
1527 | ||
1429 | separated by dots. A C<URI> object belonging to this namespace has an | |
1528 | ||
1430 | additional method called $uri->oid that can be used to get/set the oid | |
1529 | ||
1431 | value. In a list context, oid numbers are returned as separate elements. | |
1530 | ||
1432 | (TBT) | |
1531 | リストコンテキストでは、oid 番号は分割された要素として返されます。 | |
1532 | 1433 | |
1533 | 1434 | =back |
1534 | 1435 | |
1535 | 1436 | =head1 CONFIGURATION VARIABLES |
1536 | 1437 | |
1537 | 1438 | (構成設定変数) |
1538 | 1439 | |
1539 | 1440 | =begin original |
1540 | 1441 | |
1541 | 1442 | The following configuration variables influence how the class and its |
1542 | 1443 | methods behave: |
1543 | 1444 | |
1544 | 1445 | =end original |
1545 | 1446 | |
1546 | 以下の構成設定変数がクラス | |
1447 | 以下の構成設定変数がクラストそのメソッドがどのように動くかに影響を与えます: | |
1547 | 1448 | |
1548 | 1449 | =over 4 |
1549 | 1450 | |
1550 | 1451 | =item $URI::ABS_ALLOW_RELATIVE_SCHEME |
1551 | 1452 | |
1552 | 1453 | =begin original |
1553 | 1454 | |
1554 | 1455 | Some older parsers used to allow the scheme name to be present in the |
1555 | 1456 | relative URL if it was the same as the base URL scheme. RFC 2396 says |
1556 | 1457 | that this should be avoided, but you can enable this old behaviour by |
1557 | 1458 | setting the $URI::ABS_ALLOW_RELATIVE_SCHEME variable to a TRUE value. |
1558 | 1459 | The difference is demonstrated by the following examples: |
1559 | 1460 | |
1560 | 1461 | =end original |
1561 | 1462 | |
1562 | 1463 | いくつかの古いパーサは、ベース URL スキームと同じであれば、スキーム名が |
1563 | 1464 | 相対でも存在することを許すことがあります。 |
1564 | 1465 | RFC 2396 はこれはやめるべきだと言っていますが、 |
1565 | 1466 | $URI::ABS_ALLOW_RELATIVE_SCHEME 変数を TRUE に設定することによりこの古い |
1566 | 1467 | 動きを可能にできます。 |
1567 | 1468 | 以下の例で違いを示します: |
1568 | 1469 | |
1569 | 1470 | URI->new("http:foo")->abs("http://host/a/b") |
1570 | 1471 | ==> "http:foo" |
1571 | 1472 | |
1572 | 1473 | local $URI::ABS_ALLOW_RELATIVE_SCHEME = 1; |
1573 | 1474 | URI->new("http:foo")->abs("http://host/a/b") |
1574 | 1475 | ==> "http:/host/a/foo" |
1575 | 1476 | |
1576 | 1477 | |
1577 | 1478 | =item $URI::ABS_REMOTE_LEADING_DOTS |
1578 | 1479 | |
1579 | 1480 | =begin original |
1580 | 1481 | |
1581 | 1482 | You can also have the abs() method ignore excess ".." |
1582 | 1483 | segments in the relative URI by setting $URI::ABS_REMOTE_LEADING_DOTS |
1583 | 1484 | to a TRUE value. The difference is demonstrated by the following |
1584 | 1485 | examples: |
1585 | 1486 | |
1586 | 1487 | =end original |
1587 | 1488 | |
1588 | 1489 | $URI::ABS_REMOTE_LEADING_DOTS を TRUE に設定することにより、abs() メソッドに |
1589 | 1490 | 相対 URI での過剰な ".." セグメントを無視させることもできます。 |
1590 | 1491 | 以下の例で違いを示します: |
1591 | 1492 | |
1592 | 1493 | URI->new("../../../foo")->abs("http://host/a/b") |
1593 | 1494 | ==> "http://host/../../foo" |
1594 | 1495 | |
1595 | 1496 | local $URI::ABS_REMOTE_LEADING_DOTS = 1; |
1596 | 1497 | URI->new("../../../foo")->abs("http://host/a/b") |
1597 | 1498 | ==> "http://host/foo" |
1598 | 1499 | |
1599 | =item $URI::DEFAULT_QUERY_FORM_DELIMITER | |
1600 | ||
1601 | =begin original | |
1602 | ||
1603 | This value can be set to ";" to have the query form C<key=value> pairs | |
1604 | delimited by ";" instead of "&" which is the default. | |
1605 | ||
1606 | =end original | |
1607 | ||
1608 | この値は、クエリフォームの C<key=value> の組を、デフォルトの "&" ではなく | |
1609 | ";" で区切るために ";" に設定できます。 | |
1610 | ||
1611 | 1500 | =back |
1612 | 1501 | |
1613 | 1502 | =head1 BUGS |
1614 | 1503 | |
1615 | 1504 | =begin original |
1616 | 1505 | |
1617 | 1506 | Using regexp variables like $1 directly as arguments to the URI methods |
1618 | 1507 | does not work too well with current perl implementations. I would argue |
1619 | 1508 | that this is actually a bug in perl. The workaround is to quote |
1620 | 1509 | them. Example: |
1621 | 1510 | |
1622 | 1511 | =end original |
1623 | 1512 | |
1624 | 1513 | URI メソッドへの引数として、$1 のような正規表現変数を直接使うと、 |
1625 | 1514 | 現在の perl の実装ではあまりうまく動きません。 |
1626 | 1515 | 私はこれは perl のバグであると主張しています。 |
1627 | 1516 | 回避方法は、クォートすることです。 |
1628 | 1517 | 例: |
1629 | 1518 | |
1630 | 1519 | /(...)/ || die; |
1631 | 1520 | $u->query("$1"); |
1632 | 1521 | |
1633 | 1522 | =head1 PARSING URIs WITH REGEXP |
1634 | 1523 | |
1635 | 1524 | (正規表現を含む URI のパース) |
1636 | 1525 | |
1637 | 1526 | =begin original |
1638 | 1527 | |
1639 | 1528 | As an alternative to this module, the following (official) regular |
1640 | 1529 | expression can be used to decode a URI: |
1641 | 1530 | |
1642 | 1531 | =end original |
1643 | 1532 | |
1644 | 1533 | このモジュールの代替品として、以下の (公式) 正規表現が URI のデコードに |
1645 | 1534 | 使えます: |
1646 | 1535 | |
1647 | 1536 | my($scheme, $authority, $path, $query, $fragment) = |
1648 | 1537 | $uri =~ m|(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?|; |
1649 | 1538 | |
1650 | 1539 | =begin original |
1651 | 1540 | |
1652 | 1541 | The C<URI::Split> module provides the function uri_split() as a |
1653 | 1542 | readable alternative. |
1654 | 1543 | |
1655 | 1544 | =end original |
1656 | 1545 | |
1657 | 1546 | C<URI::Split> モジュールは、可読な代替物として uri_split() 関数を |
1658 | 1547 | 提供します。 |
1659 | 1548 | |
1660 | 1549 | =head1 SEE ALSO |
1661 | 1550 | |
1662 | 1551 | L<URI::file>, L<URI::WithBase>, L<URI::QueryParam>, L<URI::Escape>, |
1663 | 1552 | L<URI::Split>, L<URI::Heuristic> |
1664 | 1553 | |
1665 | 1554 | RFC 2396: "Uniform Resource Identifiers (URI): Generic Syntax", |
1666 | 1555 | Berners-Lee, Fielding, Masinter, August 1998. |
1667 | 1556 | |
1668 | ||
1557 | http://www.iana.org/assignments/uri-schemes | |
1669 | 1558 | |
1670 | ||
1559 | http://www.iana.org/assignments/urn-namespaces | |
1671 | 1560 | |
1672 | ||
1561 | http://www.w3.org/Addressing/ | |
1673 | 1562 | |
1674 | 1563 | =head1 COPYRIGHT |
1675 | 1564 | |
1676 | Copyright 1995-200 | |
1565 | Copyright 1995-2003 Gisle Aas. | |
1677 | 1566 | |
1678 | 1567 | Copyright 1995 Martijn Koster. |
1679 | 1568 | |
1680 | 1569 | This program is free software; you can redistribute it and/or modify |
1681 | 1570 | it under the same terms as Perl itself. |
1682 | 1571 | |
1683 | 1572 | =head1 AUTHORS / ACKNOWLEDGMENTS |
1684 | 1573 | |
1685 | =begin original | |
1686 | ||
1687 | 1574 | This module is based on the C<URI::URL> module, which in turn was |
1688 | 1575 | (distantly) based on the C<wwwurl.pl> code in the libwww-perl for |
1689 | 1576 | perl4 developed by Roy Fielding, as part of the Arcadia project at the |
1690 | 1577 | University of California, Irvine, with contributions from Brooks |
1691 | 1578 | Cutter. |
1692 | 1579 | |
1693 | =end original | |
1694 | ||
1695 | このモジュールは、C<URI::URL> モジュールを基にしています; | |
1696 | これは、University of California, Irvine の Arcadia プロジェクトの | |
1697 | 一部として、Brooks Cutter の貢献と共に、Roy Fielding によって | |
1698 | 開発された、perl4 のための libwww-perl 内の C<wwwurl.pl> のコードを | |
1699 | (遠くに)基にしています。 | |
1700 | ||
1701 | =begin original | |
1702 | ||
1703 | 1580 | C<URI::URL> was developed by Gisle Aas, Tim Bunce, Roy Fielding and |
1704 | 1581 | Martijn Koster with input from other people on the libwww-perl mailing |
1705 | 1582 | list. |
1706 | 1583 | |
1707 | =end original | |
1708 | ||
1709 | C<URI::URL> は、libwww-perl メーリングリストの人々からの情報とともに、 | |
1710 | Gisle Aas, Tim Bunce, Roy Fielding, Martijn Koster によって開発されました。 | |
1711 | ||
1712 | =begin original | |
1713 | ||
1714 | 1584 | C<URI> and related subclasses was developed by Gisle Aas. |
1715 | 1585 | |
1716 | =end original | |
1717 | ||
1718 | C<URI> および関連サブクラスは、Gisle Aas によって開発されました。 | |
1719 | ||
1720 | 1586 | =begin meta |
1721 | 1587 | |
1722 | 1588 | Translate: Hippo2000 <GCD00051@nifty.ne.jp> (1.04) |
1723 | 1589 | Update: SHIRAKATA Kentaro <argrath@ub32.org> (1.35) |
1724 | Status: | |
1590 | Status: in progress | |
1725 | 1591 | |
1726 | 1592 | =end meta |
1727 | 1593 | |
1728 | 1594 | =cut |