[perldocjp-cvs 411] CVS update: docs/modules/libwww-perl-5.813/LWP

Zurück zum Archiv-Index

argra****@users***** argra****@users*****
2009年 3月 16日 (月) 01:01:06 JST


Index: docs/modules/libwww-perl-5.813/LWP/UserAgent.pod
diff -u docs/modules/libwww-perl-5.813/LWP/UserAgent.pod:1.1 docs/modules/libwww-perl-5.813/LWP/UserAgent.pod:1.2
--- docs/modules/libwww-perl-5.813/LWP/UserAgent.pod:1.1	Fri Mar 13 20:43:38 2009
+++ docs/modules/libwww-perl-5.813/LWP/UserAgent.pod	Mon Mar 16 01:01:06 2009
@@ -62,11 +62,10 @@
 そしてこのリクエストは UserAgent のリクエストメソッドの一つに渡されます;
 これは対応するプロトコルを使ってそれを発行し、
 C<HTTP::Response> オブジェクトを返します。
-There are
-convenience methods for sending the most common request types: get(),
-head() and post().  When using these methods then the creation of the
-request object is hidden as shown in the synopsis above.
-(TBT)
+もっとも一般的なリクエスト型のための便利メソッド get(), head(), post()
+があります。
+これらのメソッドを使うときは、上述の用例の通り、
+リクエストオブジェクトの作成は隠蔽されます。
 
 =begin original
 
@@ -109,10 +108,10 @@
 
 =end original
 
-This method constructs a new C<LWP::UserAgent> object and returns it.
-Key/value pair arguments may be provided to set up the initial state.
-The following options correspond to attribute methods described below:
-(TBT)
+このメソッドは新しい C<LWP::UserAgent> オブジェクトを構成して、それを
+返します。
+初期状態を設定するためにキー-値のペアの引数を指定できます。
+以下のオプションは後述する属性メソッドに対応します:
 
    KEY                     DEFAULT
    -----------             --------------------
@@ -141,14 +140,14 @@
 
 =end original
 
-The following additional options are also accepted: If the
-C<env_proxy> option is passed in with a TRUE value, then proxy
-settings are read from environment variables (see env_proxy() method
-below).  If the C<keep_alive> option is passed in, then a
-C<LWP::ConnCache> is set up (see conn_cache() method below).  The
-C<keep_alive> value is passed on as the C<total_capacity> for the
-connection cache.
-(TBT)
+以下の追加のオプションも指定できます:
+C<env_proxy> オプションが真の値とともに渡されると、プロキシセッティングは
+環境変数から読み込まれます(後述する env_proxy() メソッドを参照してください)。
+C<keep_alive> オプションが渡されると、
+C<LWP::ConnCache> が設定されます(後述する conn_cache() メソッドを
+参照してください)。
+C<keep_alive> の値は接続キャッシュのための C<total_capacity> として
+渡されます。
 
 =item $ua->clone
 
@@ -158,13 +157,14 @@
 
 =end original
 
-Returns a copy of the LWP::UserAgent object.
-(TBT)
+LWP::UserAgent オブジェクトのコピーを返します。
 
 =back
 
 =head1 ATTRIBUTES
 
+(属性)
+
 =begin original
 
 The settings of the configuration attributes modify the behaviour of the
@@ -173,10 +173,10 @@
 
 =end original
 
-The settings of the configuration attributes modify the behaviour of the
-C<LWP::UserAgent> when it dispatches requests.  Most of these can also
-be initialized by options passed to the constructor method.
-(TBT)
+設定属性は、C<LWP::UserAgent> がリクエストを発行するときの振る舞いを
+変更します。
+これらのほとんどはコンストラクタメソッドに渡されたオプションによっても
+初期化できます。
 
 =begin original
 
@@ -186,10 +186,9 @@
 
 =end original
 
-The following attributes methods are provided.  The attribute value is
-left unchanged if no argument is given.  The return value from each
-method is the old attribute value.
-(TBT)
+以下の属性メソッドが提供されています。
+引数がない場合は属性値は変更されません。
+それぞれのメソッドの返り値は古い属性値です。
 
 =over
 
@@ -218,9 +217,8 @@
 
 =end original
 
-If the $product_id ends with space then the _agent() string is
-appended to it.
-(TBT)
+$product_id が空白で終わっている場合は、その値に _agent() の文字列が
+追加されます。
 
 =begin original
 
@@ -250,10 +248,9 @@
 
 =end original
 
-Returns the default agent identifier.  This is a string of the form
-"libwww-perl/#.##", where "#.##" is substituted with the version number
-of this library.
-(TBT)
+デフォルトのエージェント識別子を返します。
+これは "libwww-perl/#.##" 形式の文字列で、"#.##" はこのライブラリの
+バージョン番号で置き換えられます。
 
 =item $ua->from
 
@@ -283,9 +280,9 @@
 
 =end original
 
-The default is to not send a "From" header.  See the default_headers()
-method for the more general interface that allow any header to be defaulted.
-(TBT)
+デフォルトでは、"From" ヘッダを送信しません。
+任意のヘッダをデフォルトで指定できる、より一般的なインターフェースについては
+default_headers() メソッドを参照してください。
 
 =item $ua->cookie_jar
 
@@ -303,13 +300,12 @@
 =end original
 
 利用するためにクッキー瓶(cookie jar)オブジェクトを取得または設定します。
-The only requirement is that
-the cookie jar object must implement the extract_cookies($request) and
-add_cookie_header($response) methods.  These methods will then be
-invoked by the user agent as requests are sent and responses are
-received.  Normally this will be a C<HTTP::Cookies> object or some
-subclass.
-(TBT)
+唯一の必要条件は、クッキー瓶オブジェクトは
+extract_cookies($request) メソッドと add_cookie_header($response) メソッドを
+実装している必要があると言うことです。
+これらのメソッドは、リクエストが送信されるときとレスポンスが受信されたときに
+ユーザエージェントによって起動されます。
+通常これは C<HTTP::Cookies> オブジェクトかそのサブクラスです。
 
 =begin original
 
@@ -330,11 +326,11 @@
 
 =end original
 
-Shortcut: If a reference to a plain hash is passed in as the
-$cookie_jar_object, then it is replaced with an instance of
-C<HTTP::Cookies> that is initialized based on the hash.  This form also
-automatically loads the C<HTTP::Cookies> module.  It means that:
-(TBT)
+短縮形: もし単純なハッシュへのリファレンスが
+$cookie_jar_object として渡されると、このハッシュを基にして初期化された
+C<HTTP::Cookies> のインスタンスで置き換えられます。
+この形式はまた、自動的に C<HTTP::Cookies> モジュールを読み込みます。
+つまり、以下のようにすると:
 
   $ua->cookie_jar({ file => "$ENV{HOME}/.cookies.txt" });
 
@@ -344,8 +340,7 @@
 
 =end original
 
-is really just a shortcut for:
-(TBT)
+これは実際には以下の省略形です:
 
   require HTTP::Cookies;
   $ua->cookie_jar(HTTP::Cookies->new(file => "$ENV{HOME}/.cookies.txt"));
@@ -362,10 +357,10 @@
 
 =end original
 
-Get/set the headers object that will provide default header values for
-any requests sent.  By default this will be an empty C<HTTP::Headers>
-object.  Example:
-(TBT)
+任意のレスポンスが送信されるときのデフォルトのヘッダ値を提供する
+ヘッダオブジェクトを取得または設定します。
+デフォルトではこれは空の C<HTTP::Headers> オブジェクトです。
+例:
 
   $ua->default_headers->push_header('Accept-Language' => "no, en");
 
@@ -380,9 +375,9 @@
 
 =end original
 
-This is just a short-cut for $ua->default_headers->header( $field =>
-$value ). Example:
-(TBT)
+これは単に $ua->default_headers->header( $field => $value ) の
+短縮形です。
+例:
 
   $ua->default_header('Accept-Language' => "no, en");
 
@@ -397,9 +392,8 @@
 
 =end original
 
-Get/set the C<LWP::ConnCache> object to use.  See L<LWP::ConnCache>
-for details.
-(TBT)
+使用する C<LWP::ConnCache> オブジェクトを取得または設定します。
+詳しくは L<LWP::ConnCache> を参照してください。
 
 =item $ua->credentials( $netloc, $realm, $uname, $pass )
 
@@ -420,9 +414,9 @@
 
 =end original
 
-The $netloc a string of the form "<host>:<port>".  The username and
-password will only be passed to this server.  Example:
-(TBT)
+$netloc は "<host>:<port>" の形式の文字列です。
+ユーザ名とパスワードはこのサーバにのみ渡されます。
+例:
 
   $ua->credentials("www.example.com:80", "Some Realm", "foo", "secret");
 
@@ -445,14 +439,13 @@
 
 レスポンスの内容(content)の大きさの制限を取得または設定します。
 デフォルトは C<undef> で、これは制限なしを意味します。
-大きさの制限を越えているために、戻されたレスポンスの内容が
+長さの制限を越えているために、戻されたレスポンスの内容が
 一部だけであれば、"Client-Aborted" ヘッダがレスポンスに追加されます。
-The content
-might end up longer than C<max_size> as we abort once appending a
-chunk of data makes the length exceed the limit.  The "Content-Length"
-header, if present, will indicate the length of the full content and
-will normally not be the same as C<< length($res->content) >>.
-(TBT)
+内容の長さが制限を超えることになるデータの固まりに追加するのを
+中断するので、内容の長さは結局 C<max_size> を
+超えることになることがあります。
+もし "Content-Length" ヘッダがあれば、内容全体の長さを示していて、
+これは通常は C<< length($res->content) >> と同じではありません。
 
 =item $ua->max_redirect
 
@@ -465,9 +458,8 @@
 
 =end original
 
-This reads or sets the object's limit of how many times it will obey
-redirection responses in a given request cycle.
-(TBT)
+これは、1 回のリクエストで従うリダイレクトレスポンスの
+回数の制限を読み込みまたは設定します。
 
 =begin original
 
@@ -478,11 +470,10 @@
 
 =end original
 
-By default, the value is 7. This means that if you call request()
-method and the response is a redirect elsewhere which is in turn a
-redirect, and so on seven times, then LWP gives up after that seventh
-request.
-(TBT)
+デフォルトでは、この値は 7 です。
+これは、request() を呼び出して、リダイレクトされた先でさらに
+リダイレクトされて、というのを 7 回繰り返すと、LWP は 7 回目の
+リクエストの後に諦めます。
 
 =item $ua->parse_head
 
@@ -513,10 +504,9 @@
 
 =end original
 
-This reads (or sets) this user agent's list of protocols that the
-request methods will exclusively allow.  The protocol names are case
-insensitive.
-(TBT)
+これはこのユーザエージェントが排他的に許可されているプロトコルのリストを
+読み込み(または設定)します。
+プロトコル名は大文字小文字を無視します。
 
 =begin original
 
@@ -527,11 +517,10 @@
 
 =end original
 
-For example: C<$ua-E<gt>protocols_allowed( [ 'http', 'https'] );>
-means that this user agent will I<allow only> those protocols,
-and attempts to use this user agent to access URLs with any other
-schemes (like "ftp://...") will result in a 500 error.
-(TBT)
+例: C<$ua-E<gt>protocols_allowed( [ 'http', 'https'] );> というのは、
+このユーザエージェントはこれらのプロトコル I<のみ許可されている> ことを
+意味していて、このユーザエージェントが ("ftp://..." のような) その他の
+スキームの URL にアクセスしようとすると 500 エラーとなります。
 
 =begin original
 
@@ -539,8 +528,7 @@
 
 =end original
 
-To delete the list, call: C<$ua-E<gt>protocols_allowed(undef)>
-(TBT)
+リストを削除するには、以下のように呼び出します: C<$ua-E<gt>protocols_allowed(undef)>
 
 =begin original
 
@@ -549,9 +537,8 @@
 
 =end original
 
-By default, an object has neither a C<protocols_allowed> list, nor a
-C<protocols_forbidden> list.
-(TBT)
+デフォルトでは、オブジェクトは C<protocols_allowed> リストと
+C<protocols_forbidden> リストのどちらも持ちません。
 
 =begin original
 
@@ -576,10 +563,9 @@
 
 =end original
 
-This reads (or sets) this user agent's list of protocols that the
-request method will I<not> allow. The protocol names are case
-insensitive.
-(TBT)
+これはこのユーザエージェントが I<許可されていない> プロトコルのリストを
+読み込み(または設定)します。
+プロトコル名は大文字小文字を無視します。
 
 =begin original
 
@@ -602,8 +588,7 @@
 
 =end original
 
-To delete the list, call: C<$ua-E<gt>protocols_forbidden(undef)>
-(TBT)
+リストを削除するには、このように呼び出します: C<$ua-E<gt>protocols_forbidden(undef)>
 
 =item $ua->requests_redirectable
 
@@ -659,6 +644,8 @@
 
 =head2 Proxy attributes
 
+(プロキシ属性)
+
 =begin original
 
 The following methods set up when requests should be passed via a
@@ -666,9 +653,7 @@
 
 =end original
 
-The following methods set up when requests should be passed via a
-proxy server.
-(TBT)
+以下のメソッドはプロキシサーバー経由で渡されるべきリクエストを設定します。
 
 =over
 
@@ -682,7 +667,7 @@
 
 =end original
 
-そのスキームのためのプロキシ URL を設定または取得します:
+あるスキームのためのプロキシ URL を設定または取得します:
 
  $ua->proxy(['http', 'ftp'], 'http://proxy.sn.no:8001/');
  $ua->proxy('gopher', 'http://proxy.sn.no:8001/');
@@ -1161,9 +1146,8 @@
 
 =end original
 
-The headers affected by the base implementation are; "User-Agent",
-"From", "Range" and "Cookie".
-(TBT)
+基本実装によって影響を受けるヘッダは、
+"User-Agent", "From", "Range", "Cookie" です。
 
 =item $ua->redirect_ok( $prospective_request, $response )
 
@@ -1176,12 +1160,11 @@
 
 =end original
 
-このメソッドは、$response のリクエストのリダイレクションに
+このメソッドは、$response のリクエストのリダイレクトに
 従おうとする前に、request() によって呼ばれます。
-This should return a TRUE
-value if this redirection is permissible.  The $prospective_request
-will be the request to be sent if this method returns TRUE.
-(TBT)
+このリダイレクトを許可する場合には真の値を返します。
+$prospective_request は、このメソッドが真を返した場合に
+送信されるリクエストです。
 
 =begin original
 
@@ -1192,11 +1175,9 @@
 
 =end original
 
-The base implementation will return FALSE unless the method
-is in the object's C<requests_redirectable> list,
-FALSE if the proposed redirection is to a "file://..."
-URL, and TRUE otherwise.
-(TBT)
+基本実装では、メソッドがそのオブジェクトの C<requests_redirectable> リストに
+ない場合と、予定されているリダイレクトが "file://..." URL の場合に
+偽を返し、それ以外では真を返します。
 
 =item $ua->get_basic_credentials( $realm, $uri, $isproxy )
 
@@ -1211,10 +1192,9 @@
 
 基本認証またはダイジェスト認証により保護されている文書のための
 証明物 (credentials) の取得のために request() によって呼ばれます。
-The arguments passed in
-is the $realm provided by the server, the $uri requested and a boolean
-flag to indicate if this is authentication against a proxy server.
-(TBT)
+渡される引数は、$realm がサーバから提供されるレルム、
+$uri がリクエストされる URI、$isproxy がこれがプロキシサーバーに
+対する認証かどうかを示す真偽値フラグです。
 
 =begin original
 
@@ -1239,9 +1219,8 @@
 
 =end original
 
-The base implementation simply checks a set of pre-stored member
-variables, set up with the credentials() method.
-(TBT)
+基本実装は単にあらかじめ保管されているメンバ変数をチェックし、
+credentials() メソッドを設定します。
 
 =item $ua->progress( $status, $request_or_response )
 
@@ -1271,9 +1250,8 @@
 
 =end original
 
-When $status is "begin" the second argument is the request object,
-otherwise it is the response object.
-(TBT)
+2 番目の引数は、$status が "begin" の場合はリクエストオブジェクトで、
+そうでない場合はレスポンスオブジェクトです。
 
 =back
 
@@ -1287,7 +1265,7 @@
 
 =end original
 
-libwww-perl5 の一通りの概要は L<LWP> を参照してください。
+libwww-perl5 の完全な概要は L<LWP> を参照してください。
 使い方の例については、L<lwpcook> および
 F<lwp-request> と F<lwp-mirror> のスクリプトを参照してください。
 
@@ -1299,10 +1277,10 @@
 
 =end original
 
-See L<HTTP::Request> and L<HTTP::Response> for a description of the
-message objects dispatched and received.  See L<HTTP::Request::Common>
-and L<HTML::Form> for other ways to build request objects.
-(TBT)
+発行したり受信したりするメッセージオブジェクトの記述については
+L<HTTP::Request> と L<HTTP::Response> を参照してください。
+リクエストオブジェクトを構築するその他の方法については
+L<HTTP::Request::Common> と L<HTML::Form> を参照してください。
 
 =begin original
 
@@ -1311,9 +1289,8 @@
 
 =end original
 
-See L<WWW::Mechanize> and L<WWW::Search> for examples of more
-specialized user agents based on C<LWP::UserAgent>.
-(TBT)
+C<LWP::UserAgent> を基とした、より特殊化したユーザエージェントの例については
+L<WWW::Mechanize> と L<WWW::Search> を参照してください。
 
 =head1 COPYRIGHT
 



perldocjp-cvs メーリングリストの案内
Zurück zum Archiv-Index