URI-1.35 > 1.54 との差分

URI 1.54 と 1.35 の差分

11
22=encoding euc-jp
33
44=head1 NAME
55
66=begin original
77
88URI - Uniform Resource Identifiers (absolute and relative)
99
1010=end original
1111
1212URI - (絶対や相対の)統一資源識別子(Uniform Resource Identifiers)
1313
1414=head1 SYNOPSIS
1515
1616 $u1 = URI->new("http://www.perl.com");
1717 $u2 = URI->new("foo", "http");
1818 $u3 = $u2->abs($u1);
1919 $u4 = $u3->clone;
2020 $u5 = URI->new("HTTP://WWW.perl.com:80")->canonical;
2121
2222 $str = $u->as_string;
2323 $str = "$u";
2424
2525 $scheme = $u->scheme;
2626 $opaque = $u->opaque;
2727 $path = $u->path;
2828 $frag = $u->fragment;
2929
3030 $u->scheme("ftp");
3131 $u->host("ftp.perl.com");
3232 $u->path("cpan/");
3333
3434=head1 DESCRIPTION
3535
3636=begin original
3737
3838This module implements the C<URI> class. Objects of this class
3939represent "Uniform Resource Identifier references" as specified in RFC
40402396 (and updated by RFC 2732).
4141
4242=end original
4343
4444このモジュールは C<URI> クラスを実装します。
4545このクラスのオブジェクトは RFC 2396 で
4646指定されている (そして RFC 2732 更新された)
4747統一資源識別子参照 ("Uniform Resource Identifier references")を
4848表わしています。
4949
5050=begin original
5151
5252A Uniform Resource Identifier is a compact string of characters that
5353identifies an abstract or physical resource. A Uniform Resource
5454Identifier can be further classified as either a Uniform Resource Locator
5555(URL) or a Uniform Resource Name (URN). The distinction between URL
5656and URN does not matter to the C<URI> class interface. A
5757"URI-reference" is a URI that may have additional information attached
5858in the form of a fragment identifier.
5959
6060=end original
6161
6262統一資源識別子 (Uniform Resource Identifier) は抽象的あるいは物理的
6363リソースを識別するための文字のコンパクトな文字列です。
6464統一資源識別子はさらに統一資源位置指定子 (Uniform Resource Locator) (URL) と
6565統一資源名 (Uniform Resource Name) (URN) に分類することができます。
6666URL と URN の違いは C<URI> クラスインターフェースには関係ありません。
6767URI 参照 ("URI-reference") は、
6868フラグメントXS識別子 (fragment identifier) の形式で付けられる追加の情報を
6969持つことがある URI です。
7070
7171=begin original
7272
7373An absolute URI reference consists of three parts: a I<scheme>, a
7474I<scheme-specific part> and a I<fragment> identifier. A subset of URI
7575references share a common syntax for hierarchical namespaces. For
7676these, the scheme-specific part is further broken down into
7777I<authority>, I<path> and I<query> components. These URIs can also
7878take the form of relative URI references, where the scheme (and
7979usually also the authority) component is missing, but implied by the
8080context of the URI reference. The three forms of URI reference
8181syntax are summarized as follows:
8282
8383=end original
8484
8585絶対 URI リファレンスは三つの部分で構成されます: I<スキーム>(scheme)、
8686I<スキーム独自部分> (scheme specific part)、
8787そして I<フラグメント> 識別子です。
8888URI リファレンスのサブセットは階層的名前空間のための共通の文法を共有します。
8989これらのためスキーム独自部分は、さらに I<authority>, I<path>,
9090I<query> 要素に分けられます。
9191これらの URI は相対 URI リファレンスの形式を取ることもできます。
9292そこでは scheme (そして通常は authority も)要素がなく、しかし URI
9393リファレンスの文脈により暗黙のうちに決められています。
9494URI リファレンスの書式の三つの形式は、以下のようにまとめることができます:
9595
9696 <scheme>:<scheme-specific-part>#<fragment>
9797 <scheme>://<authority><path>?<query>#<fragment>
9898 <path>?<query>#<fragment>
9999
100100=begin original
101101
102102The components into which a URI reference can be divided depend on the
103103I<scheme>. The C<URI> class provides methods to get and set the
104104individual components. The methods available for a specific
105105C<URI> object depend on the scheme.
106106
107107=end original
108108
109109URI リファレンスの構成要素はスキームに依存して分割されます。
110110C<URI> クラスは個々の構成要素を取得し、設定するメソッドを提供します。
111111特定の C<URI> オブジェクトのために利用できるメソッドはスキームに依存します。
112112
113113=head1 CONSTRUCTORS
114114
115115(コンストラクタ)
116116
117117=begin original
118118
119119The following methods construct new C<URI> objects:
120120
121121=end original
122122
123123以下のメソッドが新しい C<URI> オブジェクトを組み立てます:
124124
125125=over 4
126126
127127=item $uri = URI->new( $str )
128128
129129=item $uri = URI->new( $str, $scheme )
130130
131131=begin original
132132
133133Constructs a new URI object. The string
134134representation of a URI is given as argument, together with an optional
135135scheme specification. Common URI wrappers like "" and <>, as well as
136136leading and trailing white space, are automatically removed from
137137the $str argument before it is processed further.
138138
139139=end original
140140
141141新しい URI オブジェクトを組み立てます。
142142URI の文字列表現が引数として、オプションのスキーム指定とともに与えられます。
143143"" や <> のような共通の URI ラッパ、そして前や後ろにつく空白は、さらに
144144処理される前に自動的に $str 引数から削除されます。
145145
146146=begin original
147147
148148The constructor determines the scheme, maps this to an appropriate
149149URI subclass, constructs a new object of that class and returns it.
150150
151151=end original
152152
153153コンストラクタはスキームを判定し、これを適切な URI サブクラスにマップし、
154154そのクラスの新しいオブジェクトを組み立て、それを返します。
155155
156156=begin original
157157
158158The $scheme argument is only used when $str is a
159159relative URI. It can be either a simple string that
160160denotes the scheme, a string containing an absolute URI reference, or
161161an absolute C<URI> object. If no $scheme is specified for a relative
162162URI $str, then $str is simply treated as a generic URI (no scheme-specific
163163methods available).
164164
165165=end original
166166
167167$scheme 引数は $str が相対 URI のときだけ使われます。
168168それにはスキームを示す単純な文字列、絶対 URI リファレンスが入った文字列、
169169絶対 C<URI> オブジェクトが指定できます。
170170相対 URI に $scheme が指定されなければ、$str は単純に(何もスキーム独自の
171171メソッドが使えない)汎用の URI として扱われます。
172172
173173=begin original
174174
175175The set of characters available for building URI references is
176176restricted (see L<URI::Escape>). Characters outside this set are
177177automatically escaped by the URI constructor.
178178
179179=end original
180180
181181URI リファレンスを組み立てるために使える文字のセットは
182182制限されています(L<URI::Escape> を参照してください)。
183183このセットから外れる文字は URI コンストラクタにより自動的に
184184エスケープされます。
185185
186186=item $uri = URI->new_abs( $str, $base_uri )
187187
188188=begin original
189189
190190Constructs a new absolute URI object. The $str argument can
191191denote a relative or absolute URI. If relative, then it is
192192absolutized using $base_uri as base. The $base_uri must be an absolute
193193URI.
194194
195195=end original
196196
197197新しい絶対 URI オブジェクトを組み立てます。
198198$str 引数は相対もしくは絶対 URI を示すことができます。
199199そしてそれは $base_uri をベースとして使うことによって、絶対化されます。
200200$base_uri は絶対 URI でなければなりません。
201201
202202=item $uri = URI::file->new( $filename )
203203
204204=item $uri = URI::file->new( $filename, $os )
205205
206206=begin original
207207
208208Constructs a new I<file> URI from a file name. See L<URI::file>.
209209
210210=end original
211211
212212ファイル名から新しい I<file> URI を組み立てます。
213213L<URI::file> を参照してください。
214214
215215=item $uri = URI::file->new_abs( $filename )
216216
217217=item $uri = URI::file->new_abs( $filename, $os )
218218
219219=begin original
220220
221221Constructs a new absolute I<file> URI from a file name. See
222222L<URI::file>.
223223
224224=end original
225225
226226ファイル名から新しい絶対 I<file> URI を組み立てます。
227227L<URI::file> を参照してください。
228228
229229=item $uri = URI::file->cwd
230230
231231=begin original
232232
233233Returns the current working directory as a I<file> URI. See
234234L<URI::file>.
235235
236236=end original
237237
238238現在作業中のディレクトリを I<file> URI として返します。
239239L<URI::file> を参照してください。
240240
241241=item $uri->clone
242242
243243=begin original
244244
245245Returns a copy of the $uri.
246246
247247=end original
248248
249249このメソッドは $uri のコピーを返します。
250250
251251=back
252252
253253=head1 COMMON METHODS
254254
255255(共通メソッド)
256256
257257=begin original
258258
259259The methods described in this section are available for all C<URI>
260260objects.
261261
262262=end original
263263
264264このセクションで説明されるメソッドはすべての C<URI> オブジェクトで
265265利用可能です。
266266
267267=begin original
268268
269269Methods that give access to components of a URI always return the
270270old value of the component. The value returned is C<undef> if the
271271component was not present. There is generally a difference between a
272272component that is empty (represented as C<"">) and a component that is
273273missing (represented as C<undef>). If an accessor method is given an
274274argument, it updates the corresponding component in addition to
275275returning the old value of the component. Passing an undefined
276276argument removes the component (if possible). The description of
277277each accessor method indicates whether the component is passed as
278278an escaped or an unescaped string. A component that can be further
279279divided into sub-parts are usually passed escaped, as unescaping might
280280change its semantics.
281281
282282=end original
283283
284284L<URI> の構成要素へのアクセスを提供するメソッドは常にその構成要素の
285285古い値を返します。
286286その構成要素がなければ返される値は C<undef> になります。
287287一般的に構成要素が空であること(C<""> で表されます)と構成要素がないこと
288288(C<undef> で表されます)には違いがあります。
289289もしアクセサメソッドに引数が与えられれば、それは対応する構成要素を更新し、
290290その構成要素の古い値を返します。
291291未定義の引数を渡すと、(もし可能であれば)その構成要素を削除します。
292292それぞれのアクセサメソッドの説明がそのコンポーネントにエスケープされた
293293文字列として渡すのかあるいは、エスケープされない文字列として渡すのかを
294294示します。
295295さらに細かい部分に分割できる構成要素は、通常エスケープされて渡されます。
296296これはエスケープされていないとその意味が変わってしまうからです。
297297
298298=begin original
299299
300300The common methods available for all URI are:
301301
302302=end original
303303
304304すべての URI で利用可能な共通メソッドを以下に示します:
305305
306306=over 4
307307
308308=item $uri->scheme
309309
310310=item $uri->scheme( $new_scheme )
311311
312312=begin original
313313
314314Sets and returns the scheme part of the $uri. If the $uri is
315315relative, then $uri->scheme returns C<undef>. If called with an
316316argument, it updates the scheme of $uri, possibly changing the
317317class of $uri, and returns the old scheme value. The method croaks
318318if the new scheme name is illegal; a scheme name must begin with a
319319letter and must consist of only US-ASCII letters, numbers, and a few
320320special marks: ".", "+", "-". This restriction effectively means
321321that the scheme must be passed unescaped. Passing an undefined
322322argument to the scheme method makes the URI relative (if possible).
323323
324324=end original
325325
326326$uri のスキーム部分を設定し、返します。
327327もし $uri が相対であれば、$uri->scheme は C<undef> を返します。
328328もし引数付きで呼ばれれば、$uri のスキームを更新し、おそらく $uri の
329329クラスを変更します。
330330そして古いスキームの値を返します。
331331新しいスキーム名が不正であれば croak します: スキーム名は文字で始まり、
332332US-ASCII、数字そしていくつかの特別な記号: "."、"+"、"-" だけで
333333構成されなければなりません。
334334この制限は実質的にスキームはエスケープなしに渡されるべきであることを
335335意味しています。
336336スキームに未定義の引数を渡すと(可能であれば) URI は相対になります。
337337
338338=begin original
339339
340340Letter case does not matter for scheme names. The string
341341returned by $uri->scheme is always lowercase. If you want the scheme
342342just as it was written in the URI in its original case,
343343you can use the $uri->_scheme method instead.
344344
345345=end original
346346
347347文字の大文字/小文字はスキーム名では問題ありません。
348348$uri->scheme で返される値は常に小文字です。
349349もし URI に書いた元の大文字/小文字の状態が欲しいのであれば、代わりに
350350$uri->_scheme メソッドを使うことができます。
351351
352352=item $uri->opaque
353353
354354=item $uri->opaque( $new_opaque )
355355
356356=begin original
357357
358358Sets and returns the scheme-specific part of the $uri
359359(everything between the scheme and the fragment)
360360as an escaped string.
361361
362362=end original
363363
364364$uri のスキーム独自部分(スキームからフラグメントまでのすべて)を、
365365エスケープされた文字列として、設定し、返します。
366366
367367=item $uri->path
368368
369369=item $uri->path( $new_path )
370370
371371=begin original
372372
373373Sets and returns the same value as $uri->opaque unless the URI
374374supports the generic syntax for hierarchical namespaces.
375375In that case the generic method is overridden to set and return
376376the part of the URI between the I<host name> and the I<fragment>.
377377
378378=end original
379379
380380URI が階層的な名前空間のための一般的な書式をサポートしていなければ、
381381このメソッドは $uri->opaque と同じ値を設定し、返します。
382382その場合、I<ホスト名> と I<フラグメント> の間にある URI の一部を設定し、
383383返すように汎用メソッドがオーバーライドされます。
384384
385385=item $uri->fragment
386386
387387=item $uri->fragment( $new_frag )
388388
389389=begin original
390390
391391Returns the fragment identifier of a URI reference
392392as an escaped string.
393393
394394=end original
395395
396396URI リファレンスのフラグメント識別子をエスケープされた文字列として
397397返します。
398398
399399=item $uri->as_string
400400
401401=begin original
402402
403Returns a URI object to a plain ASCII string. URI objects are
403Returns a URI object to a plain string. URI objects are
404404also converted to plain strings automatically by overloading. This
405405means that $uri objects can be used as plain strings in most Perl
406406constructs.
407407
408408=end original
409409
410URI オブジェクトをプレンな ASCII 文字列にして返します。
410URI オブジェクトをプレンな文字列にして返します。
411411URI オブジェクトはオーバーロードによっても自動的にプレーンな文字列に
412412変換されます。
413413つまり $uri オブジェクトはほとんどの Perl 構造においてプレーンな
414414文字列として扱うことができるということです。
415415
416=item $uri->as_iri
417
418=begin original
419
420Returns a Unicode string representing the URI. Escaped UTF-8 sequences
421representing non-ASCII characters are turned into their corresponding Unicode
422code point.
423
424=end original
425
426URI を表現する Unicode 文字列を返します。
427非 ASCII 文字を表現するエスケープされた UTF-8 並びは、
428対応する Unicode 符号位置に変換されます。
429
430416=item $uri->canonical
431417
432418=begin original
433419
434420Returns a normalized version of the URI. The rules
435421for normalization are scheme-dependent. They usually involve
436422lowercasing the scheme and Internet host name components,
437423removing the explicit port specification if it matches the default port,
438424uppercasing all escape sequences, and unescaping octets that can be
439425better represented as plain characters.
440426
441427=end original
442428
443429URI の正規化されたものを返します。
444430正規化のルールはスキームによって違います。
445431通常はスキームとインターネットホスト名要素の小文字化、
446432デフォルトポートと同じになっている明確なポート指定の削除、すべての
447433エスケープシーケンスの大文字化、普通に表現することができる
448434エスケープされていオクテットの通常化です。
449435
450436=begin original
451437
452438For efficiency reasons, if the $uri is already in normalized form,
453439then a reference to it is returned instead of a copy.
454440
455441=end original
456442
457443効率の理由から、$uri がすでに正規化されている形式であれば、コピーの代わりに
458444それへのリファレンスが返されます。
459445
460446=item $uri->eq( $other_uri )
461447
462448=item URI::eq( $first_uri, $other_uri )
463449
464450=begin original
465451
466452Tests whether two URI references are equal. URI references
467453that normalize to the same string are considered equal. The method
468454can also be used as a plain function which can also test two string
469455arguments.
470456
471457=end original
472458
473459二つの URI リファレンスが同一であるかを調べます。
474460同じ文字列に正規化された URI リファレンスは同一であると考えます。
475461メソッドは二つの文字列引数テストすることもできる単なる関数として使うことも
476462出来ます。
477463
478464=begin original
479465
480466If you need to test whether two C<URI> object references denote the
481467same object, use the '==' operator.
482468
483469=end original
484470
485471二つの C<URI> オブジェクトリファレンスが同じオブジェクトを示しているかを
486472テストする必要があれば、'==' 演算子を使ってください。
487473
488474=item $uri->abs( $base_uri )
489475
490476=begin original
491477
492478Returns an absolute URI reference. If $uri is already
493479absolute, then a reference to it is simply returned. If the $uri
494480is relative, then a new absolute URI is constructed by combining the
495481$uri and the $base_uri, and returned.
496482
497483=end original
498484
499485絶対 URI リファレンスを返します。
500486もし $uri がすでに絶対であれば、それへのリファレンスが単に返されます。
501487$uri が相対であれば、$uri と $base_uri をつなげることにより新しい
502488絶対 URI が組み立てられ、返されます。
503489
504490=item $uri->rel( $base_uri )
505491
506492=begin original
507493
508494Returns a relative URI reference if it is possible to
509495make one that denotes the same resource relative to $base_uri.
510496If not, then $uri is simply returned.
511497
512498=end original
513499
514500同じリソースを表す $base_uri への相対を作ることが出来れば、
515501相対 URI リファレンスを返します。
516502そうでなければ、$uri が単に返されます。
517503
518=item $uri->secure
519
520=begin original
521
522Returns a TRUE value if the URI is considered to point to a resource on
523a secure channel, such as an SSL or TLS encrypted one.
524
525=end original
526
527URI が、 SSL や TLS で暗号化されているような、安全なチャンネルの
528資源を示していると考えられる場合に、真の値を返します。
529
530504=back
531505
532506=head1 GENERIC METHODS
533507
534508(汎用メソッド)
535509
536510=begin original
537511
538512The following methods are available to schemes that use the
539513common/generic syntax for hierarchical namespaces. The descriptions of
540514schemes below indicate which these are. Unknown schemes are
541515assumed to support the generic syntax, and therefore the following
542516methods:
543517
544518=end original
545519
546520以下のメソッドは、階層的名前空間のための共通/汎用の書式を使う
547521スキームに使うことが出来ます。
548522下記のスキームの説明はこれらであることを示します。
549523分からないスキームは汎用の書式をサポートしており、そのため
550524以下のメソッドをサポートしているものと考えられます。
551525
552526=over 4
553527
554528=item $uri->authority
555529
556530=item $uri->authority( $new_authority )
557531
558532=begin original
559533
560534Sets and returns the escaped authority component
561535of the $uri.
562536
563537=end original
564538
565539$uri のエスケープされた authority(認証)構成要素を設定し、返します。
566540
567541=item $uri->path
568542
569543=item $uri->path( $new_path )
570544
571545=begin original
572546
573547Sets and returns the escaped path component of
574548the $uri (the part between the host name and the query or fragment).
575549The path can never be undefined, but it can be the empty string.
576550
577551=end original
578552
579553$uri のエスケープされた path 構成要素(ホスト名とクエリ(=query)または
580554フラグメントの間の部分)を設定し、返します。
581555path は決して未定義になりませんが、空文字列にすることは出来ます。
582556
583557=item $uri->path_query
584558
585559=item $uri->path_query( $new_path_query )
586560
587561=begin original
588562
589563Sets and returns the escaped path and query
590564components as a single entity. The path and the query are
591565separated by a "?" character, but the query can itself contain "?".
592566
593567=end original
594568
595569エスケープされた path と query 構成要素を1つのエンティティとして設定し、
596570取得します。
597571path と query は "?" 文字により分けられますが、query それ自身に
598572"?" を入れることが出来ます。
599573
600574=item $uri->path_segments
601575
602576=item $uri->path_segments( $segment, ... )
603577
604578=begin original
605579
606580Sets and returns the path. In a scalar context, it returns
607581the same value as $uri->path. In a list context, it returns the
608582unescaped path segments that make up the path. Path segments that
609583have parameters are returned as an anonymous array. The first element
610584is the unescaped path segment proper; subsequent elements are escaped
611585parameter strings. Such an anonymous array uses overloading so it can
612586be treated as a string too, but this string does not include the
613587parameters.
614588
615589=end original
616590
617591path を設定し、返します。
618592スカラコンテキストでは $uri->path と同じ値を返します。
619593リストコンテキストでは path を構成するエスケープされない path セグメントを
620594返します。
621595パラメータを持っている path セグメントは無名配列として返されます。
622596最初の要素はエスケープされない path セグメントプロパーです;
623597続く要素はエスケープされえたパラメータ文字列です。
624598そのような無名配列は文字列としても扱うことが出来るようオーバーロードを
625599使いますが、この文字列にはパラメータは含まれません。
626600
627601=begin original
628602
629603Note that absolute paths have the empty string as their first
630604I<path_segment>, i.e. the I<path> C</foo/bar> have 3
631605I<path_segments>; "", "foo" and "bar".
632606
633607=end original
634608
635609絶対パスは最初の I<path_segment> として空文字列を持つことに注意してください;
636610つまり、I<path> C</foo/bar> は三つの I<path_segments> つまり
637611"", "foo", "bar" になることに注意してください。
638612
639613=item $uri->query
640614
641615=item $uri->query( $new_query )
642616
643617=begin original
644618
645619Sets and returns the escaped query component of
646620the $uri.
647621
648622=end original
649623
650624$uri のエスケープさえれた query 構成要素を設定し、返します。
651625
652626=item $uri->query_form
653627
654628=item $uri->query_form( $key1 => $val1, $key2 => $val2, ... )
655629
656=item $uri->query_form( $key1 => $val1, $key2 => $val2, ..., $delim )
657
658630=item $uri->query_form( \@key_value_pairs )
659631
660=item $uri->query_form( \@key_value_pairs, $delim )
661
662632=item $uri->query_form( \%hash )
663633
664=item $uri->query_form( \%hash, $delim )
665
666634=begin original
667635
668636Sets and returns query components that use the
669637I<application/x-www-form-urlencoded> format. Key/value pairs are
670638separated by "&", and the key is separated from the value by a "="
671639character.
672640
673641=end original
674642
675643I<application/x-www-form-urlencoded> 形式を使った query 構成要素を設定し、
676644返します。
677645キー/値の組は "&" で分けられ、そのキーは値から "=" 文字で分けられます。
678646
679647=begin original
680648
681649The form can be set either by passing separate key/value pairs, or via
682650an array or hash reference. Passing an empty array or an empty hash
683651removes the query component, whereas passing no arguments at all leaves
684652the component unchanged. The order of keys is undefined if a hash
685653reference is passed. The old value is always returned as a list of
686654separate key/value pairs. Assigning this list to a hash is unwise as
687655the keys returned might repeat.
688656
689657=end original
690658
691フォームは、区切られたキー/値の組を渡すか、配列またはハッシュのリファレンス
659The form can be set either by passing separate key/value pairs, or via
692経由で設定できます。
660an array or hash reference. Passing an empty array or an empty hash
693空配列や空ハッシュを渡すと、クエリ要素を削除する一方、
661removes the query component, whereas passing no arguments at all leaves
694全く引数を渡さないと、要素は無変更で残されます。
662the component unchanged. The order of keys is undefined if a hash
695ハッシュリファレンスが渡された場合、キーの順序は未定義です。
663reference is passed. The old value is always returned as a list of
696古い値が常に、区切られたキー/値の組のリストとして返されます。
664separate key/value pairs. Assigning this list to a hash is unwise as
697キーは繰り返されるかもしれないので、
665the keys returned might repeat.
698このリストをハッシュに代入することは賢明ではありません。
666(TBT)
699667
700668=begin original
701669
702670The values passed when setting the form can be plain strings or
703671references to arrays of strings. Passing an array of values has the
704672same effect as passing the key repeatedly with one value at a time.
705673All the following statements have the same effect:
706674
707675=end original
708676
709フォームを設定するときに渡される値は、プレーンな文字列か、
677The values passed when setting the form can be plain strings or
710文字列の配列のリファレンスを使えます。
678references to arrays of strings. Passing an array of values has the
711値の配列を渡すことは、一度に一つずつ値を指定するキーを繰り返すのと
679same effect as passing the key repeatedly with one value at a time.
712同じ効果があります。
680All the following statements have the same effect:
713以下の文は全て同じ効果です:
681(TBT)
714682
715683 $uri->query_form(foo => 1, foo => 2);
716684 $uri->query_form(foo => [1, 2]);
717685 $uri->query_form([ foo => 1, foo => 2 ]);
718686 $uri->query_form([ foo => [1, 2] ]);
719687 $uri->query_form({ foo => [1, 2] });
720688
721689=begin original
722690
723The $delim parameter can be passed as ";" to force the key/value pairs
724to be delimited by ";" instead of "&" in the query string. This
725practice is often recommended for URLs embedded in HTML or XML
726documents as this avoids the trouble of escaping the "&" character.
727You 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この慣習は、"&" 文字をエスケープする問題を避けられるので、
735HTML や XML 文書中の URL としてしばしば推奨されます。
736同じグローバルな効果を得るために
737$URI::DEFAULT_QUERY_FORM_DELIMITER 変数に ";" を設定するのもよいでしょう。
738
739=begin original
740
741691The C<URI::QueryParam> module can be loaded to add further methods to
742692manipulate the form of a URI. See L<URI::QueryParam> for details.
743693
744694=end original
745695
746696URI の形式を操作するためのさらなるメソッドを追加するために、
747697C<URI::QueryParam> モジュールを読み込めます。
748698詳しくは L<URI::QueryParam> を参照してください。
749699
750700=item $uri->query_keywords
751701
752702=item $uri->query_keywords( $keywords, ... )
753703
754704=item $uri->query_keywords( \@keywords )
755705
756706=begin original
757707
758708Sets and returns query components that use the
759709keywords separated by "+" format.
760710
761711=end original
762712
763713"+" により分けられるキーワードのフォーマットを使っている query 構成要素を
764714設定し、返します。
765715
766716=begin original
767717
768718The keywords can be set either by passing separate keywords directly
769719or by passing a reference to an array of keywords. Passing an empty
770720array removes the query component, whereas passing no arguments at
771721all leaves the component unchanged. The old value is always returned
772722as a list of separate words.
773723
774724=end original
775725
776キーワードは、区切られたキーワードを直接渡すか、
726The keywords can be set either by passing separate keywords directly
777キーワードの配列のリファレンスを渡すことで設定できます。
727or by passing a reference to an array of keywords. Passing an empty
778空配列を渡すと、クエリ要素を削除する一方、
728array removes the query component, whereas passing no arguments at
779全く引数を渡さないと、要素は無変更で残されます。
729all leaves the component unchanged. The old value is always returned
780古い値が常に、区切られたキーワードのリストとして返されます。
730as a list of separate words.
731(TBT)
781732
782733=back
783734
784735=head1 SERVER METHODS
785736
786737(サーバメソッド)
787738
788739=begin original
789740
790741For schemes where the I<authority> component denotes an Internet host,
791742the following methods are available in addition to the generic
792743methods.
793744
794745=end original
795746
796747I<authority> 構成要素がインターネットホストを示すスキームは汎用メソッドに
797748加えて以下のメソッドを利用することが出来ます。
798749
799750=over 4
800751
801752=item $uri->userinfo
802753
803754=item $uri->userinfo( $new_userinfo )
804755
805756=begin original
806757
807758Sets and returns the escaped userinfo part of the
808759authority component.
809760
810761=end original
811762
812763エスケープされた authority 構成要素の userinfo 部分を設定し、返します。
813764
814765=begin original
815766
816767For some schemes this is a user name and a password separated by
817768a colon. This practice is not recommended. Embedding passwords in
818769clear text (such as URI) has proven to be a security risk in almost
819770every case where it has been used.
820771
821772=end original
822773
823774いくつかのスキームにとっては、コロンで区切られたこれはユーザ名と
824775パスワードになります。
825776この実装は推奨されません。
826777(URI のように) 平文に埋め込むことは、使うすべての場合において
827778セキュリティのリスクとなることが証明されています。
828779
829780=item $uri->host
830781
831782=item $uri->host( $new_host )
832783
833784=begin original
834785
835786Sets and returns the unescaped hostname.
836787
837788=end original
838789
839790エスケープされないホスト名を設定し、返します。
840791
841792=begin original
842793
843794If the $new_host string ends with a colon and a number, then this
844795number also sets the port.
845796
846797=end original
847798
848799$new_host 文字列がコロンと数字で終わっていれば、この番号はポートを
849800設定します。
850801
851=begin original
852
853For IPv6 addresses the brackets around the raw address is removed in the return
854value from $uri->host. When setting the host attribute to an IPv6 address you
855can use a raw address or one enclosed in brackets. The address needs to be
856enclosed in brackets if you want to pass in a new port value as well.
857
858=end original
859
860IPv6 アドレスのために、$uri->host の返り値では生アドレスの周りの
861大かっこは削除されます。
862host 属性に IPv6 アドレスを設定するとき、
863生のアドレスと一つの大かっこで囲まれたものを使えます。
864新しいポート値も渡したいときは、アドレスは大かっこで囲まれる必要があります。
865
866=item $uri->ihost
867
868=begin original
869
870Returns the host in Unicode form. Any IDNA A-labels are turned into U-labels.
871
872=end original
873
874Unicode 形式でホストを帰します。
875IDNA A ラベルは U ラベルに変えられます。
876
877802=item $uri->port
878803
879804=item $uri->port( $new_port )
880805
881806=begin original
882807
883808Sets and returns the port. The port is a simple integer
884809that should be greater than 0.
885810
886811=end original
887812
888813ポートを設定し、返します。
889814ポートは 0 より大きくなければならない単純な整数です。
890815
891816=begin original
892817
893818If a port is not specified explicitly in the URI, then the URI scheme's default port
894819is returned. If you don't want the default port
895820substituted, then you can use the $uri->_port method instead.
896821
897822=end original
898823
899824URI で明確にポートが指定されなければ、URI スキームのデフォルトのポートが
900825返されます。
901826デフォルトのポートへの置換をして欲しくないのであれば、$uri->_port メソッドを
902827代りに使うことが出来ます。
903828
904829=item $uri->host_port
905830
906831=item $uri->host_port( $new_host_port )
907832
908833=begin original
909834
910835Sets and returns the host and port as a single
911836unit. The returned value includes a port, even if it matches the
912837default port. The host part and the port part are separated by a
913838colon: ":".
914839
915840=end original
916841
917842ホストとポートを一つの単位として設定し、返します。
918843デフォルトのポートにマッチしていても、返される値にはポートも含まれます。
919844ホスト部分とポート部分はコロン ":" で区切られます。
920845
921=begin original
922
923For IPv6 addresses the bracketing is preserved; thus
924URI->new("http://[::1]/")->host_port returns "[::1]:80". Contrast this with
925$uri->host which will remove the brackets.
926
927=end original
928
929IPv6 アドレスのために、大かっこは保存されます; 従って、
930URI->new("http://[::1]/")->host_port は "[::1]:80" を返します。
931これは、大かっこを取り除く $uri->host と異なります。
932
933846=item $uri->default_port
934847
935848=begin original
936849
937850Returns the default port of the URI scheme to which $uri
938851belongs. For I<http> this is the number 80, for I<ftp> this
939852is the number 21, etc. The default port for a scheme can not be
940853changed.
941854
942855=end original
943856
944857$uri が所属する URI スキームのデフォルトポートを返します。
945858I<http> では番号 80 になり、
946859I<ftp> では番号 21 になります。
947860スキームのためのデフォルトポートは変更できません。
948861
949862=back
950863
951864=head1 SCHEME-SPECIFIC SUPPORT
952865
953866(スキーム特有サポート)
954867
955868=begin original
956869
957870Scheme-specific support is provided for the following URI schemes. For C<URI>
958871objects that do not belong to one of these, you can only use the common and
959872generic methods.
960873
961874=end original
962875
963876以下の URI スキームはスキーム固有のサポートが提供されています。
964877これらのうちの一つに所属していない C<URI> オブジェクトでは、共通と
965878汎用メソッドしか使えません。
966879
967880=over 4
968881
969882=item B<data>:
970883
971884=begin original
972885
973886The I<data> URI scheme is specified in RFC 2397. It allows inclusion
974887of small data items as "immediate" data, as if it had been included
975888externally.
976889
977890=end original
978891
979892I<data> URI スキームは RFC2397 で定義されています。
980893これはまるで外部に含まれているかのように、小さなデータ要素を
981894"immediate" データとして含むことを許しています。
982895
983896=begin original
984897
985898C<URI> objects belonging to the data scheme support the common methods
986899and two new methods to access their scheme-specific components:
987900$uri->media_type and $uri->data. See L<URI::data> for details.
988901
989902=end original
990903
991data スキームに属する C<URI> オブジェクトは共通メソッドと、スキーム特有の
904data スキームに属する C<URI> オブジェクトは共通メソッドと、スキーム特有の
992905構成要素にアクセスするための2つの新しいメソッド; $uri->media_type と
993906$uri->data をサポートします。
994907詳細は L<URI::data> を参照してください。
995908
996909=item B<file>:
997910
998911=begin original
999912
1000913An old specification of the I<file> URI scheme is found in RFC 1738.
1001914A new RFC 2396 based specification in not available yet, but file URI
1002915references are in common use.
1003916
1004917=end original
1005918
1006919B<file> URI スキームの古い仕様は RFC 1738 にあります。
1007920新しい RFC 2396 をベースとした仕様はまだ利用できませんが、file URI
1008921リファレンスは共通に使えます。
1009922
1010923=begin original
1011924
1012925C<URI> objects belonging to the file scheme support the common and
1013926generic methods. In addition, they provide two methods for mapping file URIs
1014927back to local file names; $uri->file and $uri->dir. See L<URI::file>
1015928for details.
1016929
1017930=end original
1018931
1019file スキームに属する C<URI> オブジェクトは共通と汎用のメソッドを
932file スキームに属する C<URI> オブジェクトは共通と汎用のメソッドを
1020933サポートします。
1021934さらに file URI とローカルファイル名をマッピングする二つのメソッド;
1022935$uri->file, $uri->dir を提供します。
1023936詳細は L<URI::file> を参照してください。
1024937
1025938=item B<ftp>:
1026939
1027940=begin original
1028941
1029942An old specification of the I<ftp> URI scheme is found in RFC 1738. A
1030943new RFC 2396 based specification in not available yet, but ftp URI
1031944references are in common use.
1032945
1033946=end original
1034947
1035948I<ftp> URI スキームの古い仕様は RFC 1738 にあります。
1036949新しい RFC 2396 をベースとした仕様はまだ利用できませんが、ftp URI
1037950リファレンスは共通に使えます。
1038951
1039952=begin original
1040953
1041954C<URI> objects belonging to the ftp scheme support the common,
1042955generic and server methods. In addition, they provide two methods for
1043956accessing the userinfo sub-components: $uri->user and $uri->password.
1044957
1045958=end original
1046959
1047ftp スキームに属する C<URI> オブジェクトは共通、汎用、サーバーの
960ftp スキームに属する C<URI> オブジェクトは共通、汎用、サーバーの
1048961メソッドをサポートします。
1049962さらに userinfo にアクセスするための二つのメソッド;
1050963$uri->user, $uri->password を提供します。
1051964
1052965=item B<gopher>:
1053966
1054967=begin original
1055968
1056969The I<gopher> URI scheme is specified in
1057970<draft-murali-url-gopher-1996-12-04> and will hopefully be available
1058971as a RFC 2396 based specification.
1059972
1060973=end original
1061974
1062975I<gopher> URI スキームは <draft-murali-url-gopher-1996-12-04> で定義され、
1063976RFC 2396 ベース仕様として利用できる見込みです。
1064977
1065978=begin original
1066979
1067980C<URI> objects belonging to the gopher scheme support the common,
1068981generic and server methods. In addition, they support some methods for
1069982accessing gopher-specific path components: $uri->gopher_type,
1070983$uri->selector, $uri->search, $uri->string.
1071984
1072985=end original
1073986
1074gopher スキームに属する C<URI> オブジェクトは共通、汎用、そして
987gopher スキームに属する C<URI> オブジェクトは共通、汎用、そして
1075988サーバメソッドをサポートします。
1076989さらに gopher 特有の path 構成要素にアクセスするためのメソッドを
1077990サポートします:
1078991$uri->gopher_type, $uri->selector, $uri->search, $uri->string.
1079992
1080993=item B<http>:
1081994
1082995=begin original
1083996
1084997The I<http> URI scheme is specified in RFC 2616.
1085998The scheme is used to reference resources hosted by HTTP servers.
1086999
10871000=end original
10881001
10891002I<http> URI スキームは RFC 2616 で定義されています。
10901003このスキームは HTTP サーバによりホストされる参照リソースとして使われます。
10911004
10921005=begin original
10931006
10941007C<URI> objects belonging to the http scheme support the common,
10951008generic and server methods.
10961009
10971010=end original
10981011
1099http スキームに属する C<URI> オブジェクトは共通、汎用そして
1012http スキームに属する C<URI> オブジェクトは共通、汎用そして
11001013サーバメソッドをサポートします。
11011014
11021015=item B<https>:
11031016
11041017=begin original
11051018
11061019The I<https> URI scheme is a Netscape invention which is commonly
11071020implemented. The scheme is used to reference HTTP servers through SSL
11081021connections. Its syntax is the same as http, but the default
11091022port is different.
11101023
11111024=end original
11121025
11131026I<https> URI スキームは Netscape が提案し、一般的に実装されています。
11141027このスキームは SSL 接続を通した HTTP サーバ参照のために使われます。
11151028その書式は http と同じですが、デフォルトポートは違います。
11161029
11171030=item B<ldap>:
11181031
11191032=begin original
11201033
11211034The I<ldap> URI scheme is specified in RFC 2255. LDAP is the
11221035Lightweight Directory Access Protocol. An ldap URI describes an LDAP
11231036search operation to perform to retrieve information from an LDAP
11241037directory.
11251038
11261039=end original
11271040
11281041I<ldap> URI スキームは RFC 2255 で定義されます。
11291042LDAP は軽量ディレクトリアクセスプロトコル
11301043(Lightweight Directory Access Protocol)です。
11311044ldap URI は LDAP ディレクトリから情報を取り出すために実行する LDAP 検索操作を
11321045記述します。
11331046
11341047=begin original
11351048
11361049C<URI> objects belonging to the ldap scheme support the common,
11371050generic and server methods as well as ldap-specific methods: $uri->dn,
11381051$uri->attributes, $uri->scope, $uri->filter, $uri->extensions. See
11391052L<URI::ldap> for details.
11401053
11411054=end original
11421055
1143ldap スキームに属する C<URI> オブジェクトは共通、汎用、サーバメソッドと
1056ldap スキームに属する C<URI> オブジェクトは共通、汎用、サーバメソッドと
11441057ldap 固有のメソッドをサポートします:
11451058$uri->dn, $uri->attributes, $uri->scope, $uri->filter, $uri->extensions。
11461059詳細は L<URI::ldap> を参照してください。
11471060
11481061=item B<ldapi>:
11491062
11501063=begin original
11511064
11521065Like the I<ldap> URI scheme, but uses a UNIX domain socket. The
11531066server methods are not supported, and the local socket path is
11541067available as $uri->un_path. The I<ldapi> scheme is used by the
11551068OpenLDAP package. There is no real specification for it, but it is
11561069mentioned in various OpenLDAP manual pages.
11571070
11581071=end original
11591072
11601073I<ldap> URI スキームと同様ですが、UNIX ドメインソケットを使います。
11611074サーバメソッドは非対応で、ローカルソケットパスは $uri->un_path で
11621075利用可能です。
11631076I<ldapi> スキームは OpenLDAP パッケージで使われています。
11641077これに関する実際の仕様はありませんが、様々な OpenLDAP マニュアルページで
11651078言及されています。
11661079
11671080=item B<ldaps>:
11681081
11691082=begin original
11701083
11711084Like the I<ldap> URI scheme, but uses an SSL connection. This
11721085scheme is deprecated, as the preferred way is to use the I<start_tls>
11731086mechanism.
11741087
11751088=end original
11761089
11771090I<ldap> URI スキームと同様ですが、SSL 接続を使います。
11781091このスキームは非推奨です; 好ましい方法は I<start_tls> 機構を使うことです。
11791092
11801093=item B<mailto>:
11811094
11821095=begin original
11831096
11841097The I<mailto> URI scheme is specified in RFC 2368. The scheme was
11851098originally used to designate the Internet mailing address of an
11861099individual or service. It has (in RFC 2368) been extended to allow
11871100setting of other mail header fields and the message body.
11881101
11891102=end original
11901103
11911104I<mailto> URI スキームは RFC 2368 で定義されています。
11921105スキームは元はインターネットメーリングアドレスを示すために使われました。
11931106それは(RFC 2368 で)他のメールヘッダフィールドとメッセージボディの設定を
11941107許すように拡張されています。
11951108
11961109=begin original
11971110
11981111C<URI> objects belonging to the mailto scheme support the common
11991112methods and the generic query methods. In addition, they support the
12001113following mailto-specific methods: $uri->to, $uri->headers.
12011114
12021115=end original
12031116
1204mailto スキームに属する C<URI> オブジェクトは共通メソッドと汎用の
1117mailto スキームに属する C<URI> オブジェクトは共通メソッドと汎用の
12051118問い合わせメソッドをサポートします。
12061119さらに以下の mailto 独自のメソッドもサポートします:
12071120$uri->to, $uri->headers。
12081121
1209=begin original
1210
1211Note that the "foo@example.com" part of a mailto is I<not> the
1212C<userinfo> and C<host> but instead the C<path>. This allows a
1213mailto URI to contain multiple comma separated email addresses.
1214
1215=end original
1216
1217mailto の "foo@example.com" 部分は C<userinfo> と C<host> I<ではなく>
1218C<path> であることに注意してください。
1219これにより、mailto URI にカンマ区切りで複数の電子メールアドレスを
1220含むことができます。
1221
12221122=item B<mms>:
12231123
12241124=begin original
12251125
1226The I<mms> URL specification can be found at L<http://sdp.ppona.com/>.
1126The I<mms> URL specification can be found at L<http://sdp.ppona.com/>
12271127C<URI> objects belonging to the mms scheme support the common,
12281128generic, and server methods, with the exception of userinfo and
12291129query-related sub-components.
12301130
12311131=end original
12321132
1233I<mms> URL 仕様は L<http://sdp.ppona.com/> にあります。
1133The I<mms> URL specification can be found at L<http://sdp.ppona.com/>
1234mms スキーム に所属する C<URI> オブジェクトは、
1134C<URI> objects belonging to the mms scheme support the common,
1235ユーザー情報とクエリ関連の副コマンドを除く
1135generic, and server methods, with the exception of userinfo and
1236共通、汎用、サーバメソッドに対応します。
1136query-related sub-components.
1137(TBT)
12371138
12381139=item B<news>:
12391140
12401141=begin original
12411142
12421143The I<news>, I<nntp> and I<snews> URI schemes are specified in
12431144<draft-gilman-news-url-01> and will hopefully be available as an RFC
124411452396 based specification soon.
12451146
12461147=end original
12471148
12481149I<news>, I<nntp>, I<snews> URI スキームは <draft-gilman-news-url-01> で
12491150定義され、RFC 2396 ベース仕様として使えるようになる見込みです。
12501151
12511152=begin original
12521153
12531154C<URI> objects belonging to the news scheme support the common,
12541155generic and server methods. In addition, they provide some methods to
12551156access the path: $uri->group and $uri->message.
12561157
12571158=end original
12581159
1259news スキームに属する C<URI> オブジェクトは、
1160news スキームに属する C<URI> オブジェクトは共通汎用そして
1260共通、汎用、サーバメソッドに対応します。
1161サーバメソッドをサポートします。
12611162さらに path にアクセスするためのいくつかのメソッドも提供します:
12621163$uri->group, $uri->message
12631164
12641165=item B<nntp>:
12651166
12661167=begin original
12671168
12681169See I<news> scheme.
12691170
12701171=end original
12711172
12721173I<news> スキームを参照してください。
12731174
12741175=item B<pop>:
12751176
12761177=begin original
12771178
12781179The I<pop> URI scheme is specified in RFC 2384. The scheme is used to
12791180reference a POP3 mailbox.
12801181
12811182=end original
12821183
12831184I<pop> URI スキームは RFC 2384 で定義されます。
12841185スキームは POP3 メールボックスの参照に使われます。
12851186
12861187=begin original
12871188
12881189C<URI> objects belonging to the pop scheme support the common, generic
12891190and server methods. In addition, they provide two methods to access the
12901191userinfo components: $uri->user and $uri->auth
12911192
12921193=end original
12931194
1294pop スキームに属する C<URI> オブジェクトは、
1195pop スキームに属する C<URI> オブジェクトは共通汎用、そして
1295共通、汎用、サーバメソッドに対応します。
1196サーバメソッドをサポートします。
12961197さらに userinfo 構成要素にアクセスするための2つのメソッドを提供します:
12971198$uri->user, $uri->auth
12981199
12991200=item B<rlogin>:
13001201
13011202=begin original
13021203
13031204An old specification of the I<rlogin> URI scheme is found in RFC
130412051738. C<URI> objects belonging to the rlogin scheme support the
13051206common, generic and server methods.
13061207
13071208=end original
13081209
13091210I<rlogin> URI スキームの古い仕様は RFC 1738 にあります。
1310rlogin スキームに属する C<URI> オブジェクトは、
1211rlogin スキームに属する C<URI> オブジェクトは共通汎用、サーバメソッドを
1311共通、汎用、サーバメソッドに対応します。
1212します。
13121213
13131214=item B<rtsp>:
13141215
13151216=begin original
13161217
13171218The I<rtsp> URL specification can be found in section 3.2 of RFC 2326.
13181219C<URI> objects belonging to the rtsp scheme support the common,
13191220generic, and server methods, with the exception of userinfo and
13201221query-related sub-components.
13211222
13221223=end original
13231224
1324I<rtsp> URL 仕様は RFC 2326 の 3.2 節にあります。
1225The I<rtsp> URL specification can be found in section 3.2 of RFC 2326.
1325rtsp スキームに属する C<URI> オブジェクトは、ユーザー情報と
1226C<URI> objects belonging to the rtsp scheme support the common,
1326クエリ関連の副コマンドを除く共通、汎用、サーバメソッドに対応します。
1227generic, and server methods, with the exception of userinfo and
1228query-related sub-components.
1229(TBT)
13271230
13281231=item B<rtspu>:
13291232
13301233=begin original
13311234
13321235The I<rtspu> URI scheme is used to talk to RTSP servers over UDP
13331236instead of TCP. The syntax is the same as rtsp.
13341237
13351238=end original
13361239
1337I<rtspu> URI スキームは、TCP ではなく UDP を使って RTSP サーバと
1240The I<rtspu> URI scheme is used to talk to RTSP servers over UDP
1338会話するために使われます。
1241instead of TCP. The syntax is the same as rtsp.
1339文法は rtsp と同じです。
1242(TBT)
13401243
13411244=item B<rsync>:
13421245
13431246=begin original
13441247
1345Information about rsync is available from L<http://rsync.samba.org/>.
1248Information about rsync is available from http://rsync.samba.org.
13461249C<URI> objects belonging to the rsync scheme support the common,
13471250generic and server methods. In addition, they provide methods to
13481251access the userinfo sub-components: $uri->user and $uri->password.
13491252
13501253=end original
13511254
1352rsync に関する情報は L<http://rsync.samba.org/> から利用可能です。
1255Information about rsync is available from http://rsync.samba.org.
1353rtsp スキームに属する C<URI> オブジェクトは、共通、汎用、
1256C<URI> objects belonging to the rsync scheme support the common,
1354サーバメソッドに対応します。
1257generic and server methods. In addition, they provide methods to
1355さらに、ユーザー情報および副要素にアクセスするための
1258access the userinfo sub-components: $uri->user and $uri->password.
1356メソッドを提供します: $uri->user and $uri->password。
1259(TBT)
13571260
13581261=item B<sip>:
13591262
13601263=begin original
13611264
13621265The I<sip> URI specification is described in sections 19.1 and 25
13631266of RFC 3261. C<URI> objects belonging to the sip scheme support the
13641267common, generic, and server methods with the exception of path related
13651268sub-components. In addition, they provide two methods to get and set
13661269I<sip> parameters: $uri->params_form and $uri->params.
13671270
13681271=end original
13691272
1370I<sip> URI 仕様は、RFC 3261 19.1 節と 25 節に記述されています。
1273The I<sip> URI specification is described in sections 19.1 and 25
1371sip スキームに属する C<URI> オブジェクトは、パス関連の
1274of RFC 3261. C<URI> objects belonging to the sip scheme support the
1372副要素を除く共通、汎用、サーバメソッドに対応します。
1275common, generic, and server methods with the exception of path related
1373さらに、I<sip> パラメータを取得および設定するための
1276sub-components. In addition, they provide two methods to get and set
1374二つのメソッドを提供します: $uri->params_form $uri->params
1277I<sip> parameters: $uri->params_form and $uri->params.
1278(TBT)
13751279
13761280=item B<sips>:
13771281
13781282=begin original
13791283
13801284See I<sip> scheme. Its syntax is the same as sip, but the default
13811285port is different.
13821286
13831287=end original
13841288
1385I<sip> スキームを参照してください。
1289See I<sip> scheme. Its syntax is the same as sip, but the default
1386その文法は sip と同じですが、デフォルトポートは異なります。
1290port is different.
1291(TBT)
13871292
13881293=item B<snews>:
13891294
13901295=begin original
13911296
13921297See I<news> scheme. Its syntax is the same as news, but the default
13931298port is different.
13941299
13951300=end original
13961301
13971302I<news> スキームを参照してください。
1398その文法は news と同じですが、デフォルトポートは異なります。
1303その書式は news と同じですが、デフォルトポートは違います。
13991304
14001305=item B<telnet>:
14011306
14021307=begin original
14031308
14041309An old specification of the I<telnet> URI scheme is found in RFC
140513101738. C<URI> objects belonging to the telnet scheme support the
14061311common, generic and server methods.
14071312
14081313=end original
14091314
14101315I<telnet> URI スキームの古い仕様は RFC 1738 にあります。
1411telnet スキームに属する C<URI> オブジェクトは、
1316telnet スキームに属する C<URI> オブジェクトは共通汎用そして
1412共通、汎用、サーバメソッドに対応します。
1317サーバメソッドをサポートします。
14131318
14141319=item B<tn3270>:
14151320
14161321=begin original
14171322
14181323These URIs are used like I<telnet> URIs but for connections to IBM
14191324mainframes. C<URI> objects belonging to the tn3270 scheme support the
14201325common, generic and server methods.
14211326
14221327=end original
14231328
1424これらの URI I<telnet> URI のように使われますが、
1329These URIs are used like I<telnet> URIs but for connections to IBM
1425IBM メインフレームへの接続のためのものです。
1330mainframes. C<URI> objects belonging to the tn3270 scheme support the
1426tn3270 スキームに属する C<URI> オブジェクトは、
1331common, generic and server methods.
1427共通、汎用、サーバメソッドに対応します。
1332(TBT)
14281333
14291334=item B<ssh>:
14301335
14311336=begin original
14321337
1433Information about ssh is available at L<http://www.openssh.com/>.
1338Information about ssh is available at http://www.openssh.com/.
14341339C<URI> objects belonging to the ssh scheme support the common,
14351340generic and server methods. In addition, they provide methods to
14361341access the userinfo sub-components: $uri->user and $uri->password.
14371342
14381343=end original
14391344
1440ssh に関する情報は L<http://www.openssh.com/> から利用可能です。
1345Information about ssh is available at http://www.openssh.com/.
1441ssh スキームに属する C<URI> オブジェクトは、
1346C<URI> objects belonging to the ssh scheme support the common,
1442共通、汎用、サーバメソッドに対応します。
1347generic and server methods. In addition, they provide methods to
1443さらに、ユーザー情報と副要素にアクセスするための
1348access the userinfo sub-components: $uri->user and $uri->password.
1444メソッドを提供します: $uri->user と $uri->password。
1349(TBT)
14451350
14461351=item B<urn>:
14471352
14481353=begin original
14491354
14501355The syntax of Uniform Resource Names is specified in RFC 2141. C<URI>
14511356objects belonging to the urn scheme provide the common methods, and also the
14521357methods $uri->nid and $uri->nss, which return the Namespace Identifier
14531358and the Namespace-Specific String respectively.
14541359
14551360=end original
14561361
1457The syntax of Uniform Resource Names is specified in RFC 2141.
1362The syntax of Uniform Resource Names is specified in RFC 2141. C<URI>
1458ssh スキームに属する C<URI> オブジェクトは、
1363objects belonging to the urn scheme provide the common methods, and also the
1459共通メソッドおよび、$uri->nid メソッドと $uri->nss メソッドを提供します;
1364methods $uri->nid and $uri->nss, which return the Namespace Identifier
1460これらはそれぞれ Namespace Identifier
1365and the Namespace-Specific String respectively.
1461と Namespace-Specific String を返します。
1366(TBT)
14621367
14631368=begin original
14641369
14651370The Namespace Identifier basically works like the Scheme identifier of
14661371URIs, and further divides the URN namespace. Namespace Identifier
14671372assignments are maintained at
1468L<http://www.iana.org/assignments/urn-namespaces>.
1373<http://www.iana.org/assignments/urn-namespaces>.
14691374
14701375=end original
14711376
1472Namespace Identifier は基本的に URI のスキーム識別子と
1377The Namespace Identifier basically works like the Scheme identifier of
1473同様に働き、さらに URN 名前空間を分割します。
1378URIs, and further divides the URN namespace. Namespace Identifier
1474Namespace Identifier 割り当ては
1379assignments are maintained at
1475L<http://www.iana.org/assignments/urn-namespaces>
1380<http://www.iana.org/assignments/urn-namespaces>.
1476保守されています。
1381(TBT)
14771382
14781383=begin original
14791384
14801385Letter case is not significant for the Namespace Identifier. It is
14811386always returned in lower case by the $uri->nid method. The $uri->_nid
14821387method can be used if you want it in its original case.
14831388
14841389=end original
14851390
1486Namespace Identifier での大文字小文字は無視されます。
1391Letter case is not significant for the Namespace Identifier. It is
1487$uri->nid メソッドによってこれは常に小文字で返されます。
1392always returned in lower case by the $uri->nid method. The $uri->_nid
1488元の大文字小文字が知りたい場合は
1393method can be used if you want it in its original case.
1489$uri->_nid が使えます。
1394(TBT)
14901395
14911396=item B<urn>:B<isbn>:
14921397
14931398=begin original
14941399
14951400The C<urn:isbn:> namespace contains International Standard Book
14961401Numbers (ISBNs) and is described in RFC 3187. A C<URI> object belonging
14971402to this namespace has the following extra methods (if the
14981403Business::ISBN module is available): $uri->isbn,
1499$uri->isbn_publisher_code, $uri->isbn_group_code (formerly isbn_country_code,
1404$uri->isbn_publisher_code, $uri->isbn_country_code, $uri->isbn_as_ean.
1500which is still supported by issues a deprecation warning), $uri->isbn_as_ean.
15011405
15021406=end original
15031407
1504The C<urn:isbn:> 名前空間は国際標準図書番号 (ISBN) を含んでいて、
1408The C<urn:isbn:> namespace contains International Standard Book
1505RFC 3187 に記述されています。
1409Numbers (ISBNs) and is described in RFC 3187. A C<URI> object belonging
1506この名前空間に属する C<URI> オブジェクトは、(Business::ISBN
1410to this namespace has the following extra methods (if the
1507モジュールが利用可能なら 次の追加のメソッドを持ちます:
1411Business::ISBN module is available): $uri->isbn,
1508$uri->isbn,
1412$uri->isbn_publisher_code, $uri->isbn_country_code, $uri->isbn_as_ean.
1509$uri->isbn_publisher_code, $uri->isbn_group_code
1413(TBT)
1510(以前は isbn_country_code でした; 廃止予定警告付きで今でも対応しています),
1511$uri->isbn_as_ean。
15121414
15131415=item B<urn>:B<oid>:
15141416
15151417=begin original
15161418
15171419The C<urn:oid:> namespace contains Object Identifiers (OIDs) and is
15181420described in RFC 3061. An object identifier consists of sequences of digits
15191421separated by dots. A C<URI> object belonging to this namespace has an
15201422additional method called $uri->oid that can be used to get/set the oid
15211423value. In a list context, oid numbers are returned as separate elements.
15221424
15231425=end original
15241426
1525C<urn:oid:> 名前空間は オブジェクト識別子 (OID) を含んでいて、
1427The C<urn:oid:> namespace contains Object Identifiers (OIDs) and is
1526RFC 3061 に記述されています。
1428described in RFC 3061. An object identifier consists of sequences of digits
1527オブジェクト識別子は、ドットで区切られた数字の並びで構成されます。
1429separated by dots. A C<URI> object belonging to this namespace has an
1528この名前空間に属する C<URI> オブジェクトは、
1430additional method called $uri->oid that can be used to get/set the oid
1529$uri->oid と呼ばれる追加のメソッドを持ち、
1431value. In a list context, oid numbers are returned as separate elements.
1530oid 値を取得/設定するために使われます。
1432(TBT)
1531リストコンテキストでは、oid 番号は分割された要素として返されます。
15321433
15331434=back
15341435
15351436=head1 CONFIGURATION VARIABLES
15361437
15371438(構成設定変数)
15381439
15391440=begin original
15401441
15411442The following configuration variables influence how the class and its
15421443methods behave:
15431444
15441445=end original
15451446
1546以下の構成設定変数がクラスそのメソッドがどのように動くかに影響を与えます:
1447以下の構成設定変数がクラスそのメソッドがどのように動くかに影響を与えます:
15471448
15481449=over 4
15491450
15501451=item $URI::ABS_ALLOW_RELATIVE_SCHEME
15511452
15521453=begin original
15531454
15541455Some older parsers used to allow the scheme name to be present in the
15551456relative URL if it was the same as the base URL scheme. RFC 2396 says
15561457that this should be avoided, but you can enable this old behaviour by
15571458setting the $URI::ABS_ALLOW_RELATIVE_SCHEME variable to a TRUE value.
15581459The difference is demonstrated by the following examples:
15591460
15601461=end original
15611462
15621463いくつかの古いパーサは、ベース URL スキームと同じであれば、スキーム名が
15631464相対でも存在することを許すことがあります。
15641465RFC 2396 はこれはやめるべきだと言っていますが、
15651466$URI::ABS_ALLOW_RELATIVE_SCHEME 変数を TRUE に設定することによりこの古い
15661467動きを可能にできます。
15671468以下の例で違いを示します:
15681469
15691470 URI->new("http:foo")->abs("http://host/a/b")
15701471 ==> "http:foo"
15711472
15721473 local $URI::ABS_ALLOW_RELATIVE_SCHEME = 1;
15731474 URI->new("http:foo")->abs("http://host/a/b")
15741475 ==> "http:/host/a/foo"
15751476
15761477
15771478=item $URI::ABS_REMOTE_LEADING_DOTS
15781479
15791480=begin original
15801481
15811482You can also have the abs() method ignore excess ".."
15821483segments in the relative URI by setting $URI::ABS_REMOTE_LEADING_DOTS
15831484to a TRUE value. The difference is demonstrated by the following
15841485examples:
15851486
15861487=end original
15871488
15881489$URI::ABS_REMOTE_LEADING_DOTS を TRUE に設定することにより、abs() メソッドに
15891490相対 URI での過剰な ".." セグメントを無視させることもできます。
15901491以下の例で違いを示します:
15911492
15921493 URI->new("../../../foo")->abs("http://host/a/b")
15931494 ==> "http://host/../../foo"
15941495
15951496 local $URI::ABS_REMOTE_LEADING_DOTS = 1;
15961497 URI->new("../../../foo")->abs("http://host/a/b")
15971498 ==> "http://host/foo"
15981499
1599=item $URI::DEFAULT_QUERY_FORM_DELIMITER
1600
1601=begin original
1602
1603This value can be set to ";" to have the query form C<key=value> pairs
1604delimited by ";" instead of "&" which is the default.
1605
1606=end original
1607
1608この値は、クエリフォームの C<key=value> の組を、デフォルトの "&" ではなく
1609";" で区切るために ";" に設定できます。
1610
16111500=back
16121501
16131502=head1 BUGS
16141503
16151504=begin original
16161505
16171506Using regexp variables like $1 directly as arguments to the URI methods
16181507does not work too well with current perl implementations. I would argue
16191508that this is actually a bug in perl. The workaround is to quote
16201509them. Example:
16211510
16221511=end original
16231512
16241513URI メソッドへの引数として、$1 のような正規表現変数を直接使うと、
16251514現在の perl の実装ではあまりうまく動きません。
16261515私はこれは perl のバグであると主張しています。
16271516回避方法は、クォートすることです。
16281517例:
16291518
16301519 /(...)/ || die;
16311520 $u->query("$1");
16321521
16331522=head1 PARSING URIs WITH REGEXP
16341523
16351524(正規表現を含む URI のパース)
16361525
16371526=begin original
16381527
16391528As an alternative to this module, the following (official) regular
16401529expression can be used to decode a URI:
16411530
16421531=end original
16431532
16441533このモジュールの代替品として、以下の (公式) 正規表現が URI のデコードに
16451534使えます:
16461535
16471536 my($scheme, $authority, $path, $query, $fragment) =
16481537 $uri =~ m|(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?|;
16491538
16501539=begin original
16511540
16521541The C<URI::Split> module provides the function uri_split() as a
16531542readable alternative.
16541543
16551544=end original
16561545
16571546C<URI::Split> モジュールは、可読な代替物として uri_split() 関数を
16581547提供します。
16591548
16601549=head1 SEE ALSO
16611550
16621551L<URI::file>, L<URI::WithBase>, L<URI::QueryParam>, L<URI::Escape>,
16631552L<URI::Split>, L<URI::Heuristic>
16641553
16651554RFC 2396: "Uniform Resource Identifiers (URI): Generic Syntax",
16661555Berners-Lee, Fielding, Masinter, August 1998.
16671556
1668L<http://www.iana.org/assignments/uri-schemes>
1557http://www.iana.org/assignments/uri-schemes
16691558
1670L<http://www.iana.org/assignments/urn-namespaces>
1559http://www.iana.org/assignments/urn-namespaces
16711560
1672L<http://www.w3.org/Addressing/>
1561http://www.w3.org/Addressing/
16731562
16741563=head1 COPYRIGHT
16751564
1676Copyright 1995-2009 Gisle Aas.
1565Copyright 1995-2003 Gisle Aas.
16771566
16781567Copyright 1995 Martijn Koster.
16791568
16801569This program is free software; you can redistribute it and/or modify
16811570it under the same terms as Perl itself.
16821571
16831572=head1 AUTHORS / ACKNOWLEDGMENTS
16841573
1685=begin original
1686
16871574This module is based on the C<URI::URL> module, which in turn was
16881575(distantly) based on the C<wwwurl.pl> code in the libwww-perl for
16891576perl4 developed by Roy Fielding, as part of the Arcadia project at the
16901577University of California, Irvine, with contributions from Brooks
16911578Cutter.
16921579
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
17031580C<URI::URL> was developed by Gisle Aas, Tim Bunce, Roy Fielding and
17041581Martijn Koster with input from other people on the libwww-perl mailing
17051582list.
17061583
1707=end original
1708
1709C<URI::URL> は、libwww-perl メーリングリストの人々からの情報とともに、
1710Gisle Aas, Tim Bunce, Roy Fielding, Martijn Koster によって開発されました。
1711
1712=begin original
1713
17141584C<URI> and related subclasses was developed by Gisle Aas.
17151585
1716=end original
1717
1718C<URI> および関連サブクラスは、Gisle Aas によって開発されました。
1719
17201586=begin meta
17211587
17221588Translate: Hippo2000 <GCD00051@nifty.ne.jp> (1.04)
17231589Update: SHIRAKATA Kentaro <argrath@ub32.org> (1.35)
1724Status: completed
1590Status: in progress
17251591
17261592=end meta
17271593
17281594=cut