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

Back to archive index

argra****@users***** argra****@users*****
2010年 10月 21日 (木) 04:11:22 JST


Index: docs/modules/libwww-perl-5.813/LWP/MediaTypes.pod
diff -u /dev/null docs/modules/libwww-perl-5.813/LWP/MediaTypes.pod:1.1
--- /dev/null	Thu Oct 21 04:11:21 2010
+++ docs/modules/libwww-perl-5.813/LWP/MediaTypes.pod	Thu Oct 21 04:11:21 2010
@@ -0,0 +1,191 @@
+
+=encoding euc-jp
+
+=head1 NAME
+
+=begin original
+
+LWP::MediaTypes - guess media type for a file or a URL
+
+=end original
+
+LWP::MediaTypes - ファイルまたはURLのためのメディアタイプを推測する
+
+=head1 SYNOPSIS
+
+ use LWP::MediaTypes qw(guess_media_type);
+ $type = guess_media_type("/tmp/foo.gif");
+
+=head1 DESCRIPTION
+
+=begin original
+
+This module provides functions for handling media (also known as
+MIME) types and encodings.  The mapping from file extensions to media
+types is defined by the F<media.types> file.  If the F<~/.media.types>
+file exists it is used instead.
+For backwards compatibility we will also look for F<~/.mime.types>.
+
+=end original
+
+このモジュールはメディア(MIMEとしても知られる)タイプとエンコーディングを
+扱うための関数を提供します。
+ファイル拡張子からメディアタイプへのマッピングは
+F<media.types> ファイルによって定義されます。
+もし F<~/.media.types> ファイルが存在すれば、代わりにそれが使われます。
+以前のものとの互換性を保つために、F<~/.mime.types> も探します。
+
+=begin original
+
+The following functions are exported by default:
+
+=end original
+
+以下の関数がデフォルトでエクスポートされます:
+
+=over 4
+
+=item guess_media_type( $filename )
+
+=item guess_media_type( $uri )
+
+=item guess_media_type( $filename_or_uri, $header_to_modify )
+
+=begin original
+
+This function tries to guess media type and encoding for a file or a URI.
+It returns the content type, which is a string like C<"text/html">.
+In array context it also returns any content encodings applied (in the
+order used to encode the file).  You can pass a URI object
+reference, instead of the file name.
+
+=end original
+
+この関数はファイルまたは URI のためのメディアタイプとエンコードを
+推測しようとします。
+これは C<"text/html"> のような文字列で、content-type を返します。
+配列コンテキストでは、(そのファイルをエンコードするために使われる順で)
+適用されるすべての content-encodings を返します。
+ファイル名の代わりに URI オブジェクトリファレンスを渡すこともできます。
+
+=begin original
+
+If the type can not be deduced from looking at the file name,
+then guess_media_type() will let the C<-T> Perl operator take a look.
+If this works (and C<-T> returns a TRUE value) then we return
+I<text/plain> as the type, otherwise we return
+I<application/octet-stream> as the type.
+
+=end original
+
+ファイル名を見てもタイプがわからなければ、guess_media_type() は
+C<-T> Perl 演算子を使います。
+もしこれが働けば (そして C<-T> が TRUE を返せば)、タイプとして
+I<text/plain> を返します。
+そうでなければ I<application/octet-stream> をタイプとして返します。
+
+=begin original
+
+The optional second argument should be a reference to a HTTP::Headers
+object or any object that implements the $obj->header method in a
+similar way.  When it is present the values of the
+'Content-Type' and 'Content-Encoding' will be set for this header.
+
+=end original
+
+オプションの 2 番目の引数は、HTTP::Headers オブジェクトまたはそれと
+同様の方法で $obj->header を実装しているなんらかのオブジェクトへの
+リファレンスです。
+それがあると、'Content-Type' と 'Content-Encoding' の値が
+このヘッダに設定されます。
+
+=item media_suffix( $type, ... )
+
+=begin original
+
+This function will return all suffixes that can be used to denote the
+specified media type(s).  Wildcard types can be used.  In a scalar
+context it will return the first suffix found. Examples:
+
+=end original
+
+この関数は指定されたメディアタイプを示すために使うことが出来る
+すべての拡張子を返します。
+ワイルドカードタイプを使うことが出来ます。
+スカラコンテキストでは見つかった最初の拡張子を返します。
+例:
+
+  @suffixes = media_suffix('image/*', 'audio/basic');
+  $suffix = media_suffix('text/html');
+
+=back
+
+=begin original
+
+The following functions are only exported by explicit request:
+
+=end original
+
+以下の関数は明示的に要求によってのみエクスポートされます:
+
+=over 4
+
+=item add_type( $type, @exts )
+
+=begin original
+
+Associate a list of file extensions with the given media type.
+Example:
+
+=end original
+
+ファイル拡張子のリストを与えられたメディアタイプに結び付けます。
+例:
+
+    add_type("x-world/x-vrml" => qw(wrl vrml));
+
+=item add_encoding( $type, @ext )
+
+=begin original
+
+Associate a list of file extensions with an encoding type.
+Example:
+
+=end original
+
+ファイル拡張子のリストをエンコーディングタイプに結び付けます。
+例: 
+
+ add_encoding("x-gzip" => "gz");
+
+=item read_media_types( @files )
+
+=begin original
+
+Parse media types files and add the type mappings found there.
+Example:
+
+=end original
+
+メディア・タイプファイルを解析し、そこで見つかったタイプ・マッピングを
+追加します。
+例:
+
+    read_media_types("conf/mime.types");
+
+=back
+
+=head1 COPYRIGHT
+
+Copyright 1995-1999 Gisle Aas.
+
+This library is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+=begin meta
+
+Translated: Hippo2000 <GCD00****@nifty*****> (5.48)
+Updated: Kentaro SHIRAKATA <argra****@ub32*****> (5.813)
+
+=end meta
+
Index: docs/modules/libwww-perl-5.813/LWP/MemberMixin.pod
diff -u /dev/null docs/modules/libwww-perl-5.813/LWP/MemberMixin.pod:1.1
--- /dev/null	Thu Oct 21 04:11:21 2010
+++ docs/modules/libwww-perl-5.813/LWP/MemberMixin.pod	Thu Oct 21 04:11:21 2010
@@ -0,0 +1,69 @@
+
+=encoding euc-jp
+
+=head1 NAME
+
+=begin original
+
+LWP::MemberMixin - Member access mixin class
+
+=end original
+
+LWP::MemberMixin - メンバーアクセス mixin クラス
+
+=head1 SYNOPSIS
+
+ package Foo;
+ require LWP::MemberMixin;
+ @ISA=qw(LWP::MemberMixin);
+
+=head1 DESCRIPTION
+
+=begin original
+
+A mixin class to get methods that provide easy access to member
+variables in the %$self.
+Ideally there should be better Perl language support for this.
+
+=end original
+
+%$self に入っているメンバー変数への簡単なアクセスを提供する
+get メソッドのためのmixinクラスです。
+理想的にはこれに対する Perl 言語によるよりよいサポートがあるべきです。
+
+=begin original
+
+There is only one method provided:
+
+=end original
+
+一つだけメソッドを提供します:
+
+=over 4
+
+=item _elem($elem [, $val])
+
+=begin original
+
+Internal method to get/set the value of member variable
+C<$elem>. If C<$val> is present it is used as the new value
+for the member variable.  If it is not present the current
+value is not touched. In both cases the previous value of
+the member variable is returned.
+
+=end original
+
+メンバー変数 C<$elem> の値の取得/設定のための内部メソッド。
+C<$val> が存在すれば、メンバー変数のための新しい値として使われます。
+それが存在していなければ、現在の値は触られません。
+どちらの場合もメンバー変数の前の値が返されます。
+
+=back
+
+=begin meta
+
+Translated: Hippo2000 <GCD00****@nifty*****> (5.48)
+Updated: Kentaro SHIRAKATA <argra****@ub32*****> (5.813)
+
+=end meta
+
Index: docs/modules/libwww-perl-5.813/LWP/Protocol.pod
diff -u /dev/null docs/modules/libwww-perl-5.813/LWP/Protocol.pod:1.1
--- /dev/null	Thu Oct 21 04:11:21 2010
+++ docs/modules/libwww-perl-5.813/LWP/Protocol.pod	Thu Oct 21 04:11:21 2010
@@ -0,0 +1,229 @@
+
+=encoding euc-jp
+
+=head1 NAME
+
+=begin original
+
+LWP::Protocol - Base class for LWP protocols
+
+=end original
+
+LWP::Protocol - LWP プロトコルの基底クラス
+
+=head1 SYNOPSIS
+
+ package LWP::Protocol::foo;
+ require LWP::Protocol;
+ @ISA=qw(LWP::Protocol);
+
+=head1 DESCRIPTION
+
+=begin original
+
+This class is used a the base class for all protocol implementations
+supported by the LWP library.
+
+=end original
+
+このクラスは LWP ライブラリによりサポートされるすべてのプロトコル実装のための
+基底クラスとして使われます。
+
+=begin original
+
+When creating an instance of this class using
+C<LWP::Protocol::create($url)>, and you get an initialised subclass
+appropriate for that access method. In other words, the
+LWP::Protocol::create() function calls the constructor for one of its
+subclasses.
+
+=end original
+
+C<LWP::Protocol::create($url)> を使ってこのクラスのインスタンスを作成すると、
+そのアクセス方法にて記述した、初期化されたサブクラスを取得します。
+言い換えると、LWP::Protocol::create() はそのサブクラスの一つのための
+コンストラクタを呼び出します。
+
+=begin original
+
+All derived LWP::Protocol classes need to override the request()
+method which is used to service a request. The overridden method can
+make use of the collect() function to collect together chunks of data
+as it is received.
+
+=end original
+
+LWP::Protocol から派生したすべてのクラスは、リクエストをサービスするために
+使われる request() メソッドをオーバーライドする必要があります。
+オーバーライドされたメソッドは、それが受信したときにデータのチャンクを
+まとめるために collect() 関数を使うことが出来ます。
+
+=begin original
+
+The following methods and functions are provided:
+
+=end original
+
+以下の関数が提供されます:
+
+=over 4
+
+=item $prot = LWP::Protocol->new()
+
+=begin original
+
+The LWP::Protocol constructor is inherited by subclasses. As this is a
+virtual base class this method should B<not> be called directly.
+
+=end original
+
+LWP::Protocol コンストラクタはサブクラスにより継承されます。
+これは仮想基底クラスなので、このメソッドは B<直接呼ばれるべきではありません>。
+
+=item $prot = LWP::Protocol::create($scheme)
+
+=begin original
+
+Create an object of the class implementing the protocol to handle the
+given scheme. This is a function, not a method. It is more an object
+factory than a constructor. This is the function user agents should
+use to access protocols.
+
+=end original
+
+与えられた機能を取り扱うプロトコルを実装しているクラスの
+オブジェクトを作成します。
+これは関数であり、メソッドではありません。
+これはコンストラクタというより、オブジェクトファクトリです。
+これはユーザーエージェントがプロトコルにアクセスするために使うべき
+関数です。
+
+=item $class = LWP::Protocol::implementor($scheme, [$class])
+
+=begin original
+
+Get and/or set implementor class for a scheme.  Returns '' if the
+specified scheme is not supported.
+
+=end original
+
+スキームのための実装クラスを取得/設定します。
+指定されたスキームがサポートされていなければ、'' を返します。
+
+=item $prot->request(...)
+
+ $response = $protocol->request($request, $proxy, undef);
+ $response = $protocol->request($request, $proxy, '/tmp/sss');
+ $response = $protocol->request($request, $proxy, \&callback, 1024);
+
+=begin original
+
+Dispatches a request over the protocol, and returns a response
+object. This method needs to be overridden in subclasses.  Refer to
+L<LWP::UserAgent> for description of the arguments.
+
+=end original
+
+プロトコルにリクエストを発行し、レスポンスオブジェクトを返します。
+このメソッドはサブクラスでオーバーライドされる必要があります。
+引数の説明については L<LWP::UserAgent> を参照してください。
+
+=item $prot->collect($arg, $response, $collector)
+
+=begin original
+
+Called to collect the content of a request, and process it
+appropriately into a scalar, file, or by calling a callback.  If $arg
+is undefined, then the content is stored within the $response.  If
+$arg is a simple scalar, then $arg is interpreted as a file name and
+the content is written to this file.  If $arg is a reference to a
+routine, then content is passed to this routine.
+
+=end original
+
+リクエストの内容を集め、スカラやファイルへの格納、もしくは
+コールバックの呼び出しによって適切に処理するために使われます。
+$arg が未定義であれば、内容は $response に格納されます。
+$arg が単なるスカラであれば、$arg はファイル名と解釈され、内容はこの
+ファイルに書きこまれます。
+$arg がルーチンへのリファレンスであれば、内容はこの関数に渡されます。
+
+=begin original
+
+The $collector is a routine that will be called and which is
+responsible for returning pieces (as ref to scalar) of the content to
+process.  The $collector signals EOF by returning a reference to an
+empty sting.
+
+=end original
+
+$collectoer は呼ばれるルーチンです。
+そしてそれは処理する内容のカケラを (スカラへのリファレンスとして) 返すことに
+責任を持ちます。
+$collector は空文字列へのリファレンスを返すことで EOF を知らせます。
+
+=begin original
+
+The return value from collect() is the $response object reference.
+
+=end original
+
+collect() からの返り値は $response オブジェクトリファレンスです。
+
+=begin original
+
+B<Note:> We will only use the callback or file argument if
+$response->is_success().  This avoids sending content data for
+redirects and authentication responses to the callback which would be
+confusing.
+
+=end original
+
+B<注意:> $response->is_success() であったときだけ、コールバックや
+ファイル引数を使います。
+これによりリダイレクトのためのコンテント・データと混乱をまねくであろう
+コールバックへの認証レスポンスを送信することを避けています。
+
+=item $prot->collect_once($arg, $response, $content)
+
+=begin original
+
+Can be called when the whole response content is available as
+$content.  This will invoke collect() with a collector callback that
+returns a reference to $content the first time and an empty string the
+next.
+
+=end original
+
+レスポンスの内容の全体が $content として利用できるときに呼ばれます。
+これは最初に $content へのリファレンスを、次に空文字列を返す
+collector コールバックで collect() を起動します。
+
+=back
+
+=head1 SEE ALSO
+
+=begin original
+
+Inspect the F<LWP/Protocol/file.pm> and F<LWP/Protocol/http.pm> files
+for examples of usage.
+
+=end original
+
+使用例として F<LWP/Protocol/file.pm> と F<LWP/Protocol/http.pm> ファイルを
+ご覧下さい。
+
+=head1 COPYRIGHT
+
+Copyright 1995-2001 Gisle Aas.
+
+This library is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+=begin meta
+
+Translated: Hippo2000 <GCD00****@nifty*****> (5.48)
+Updated: Kentaro SHIRAKATA <argra****@ub32*****> (5.813)
+
+=end meta
+
Index: docs/modules/libwww-perl-5.813/LWP/RobotUA.pod
diff -u /dev/null docs/modules/libwww-perl-5.813/LWP/RobotUA.pod:1.1
--- /dev/null	Thu Oct 21 04:11:21 2010
+++ docs/modules/libwww-perl-5.813/LWP/RobotUA.pod	Thu Oct 21 04:11:21 2010
@@ -0,0 +1,238 @@
+
+=encoding euc-jp
+
+=head1 NAME
+
+=begin original
+
+LWP::RobotUA - a class for well-behaved Web robots
+
+=end original
+
+LWP::RobotUA - よい振る舞いをする Web ロボットのためのクラス
+
+=head1 SYNOPSIS
+
+  use LWP::RobotUA;
+  my $ua = LWP::RobotUA->new('my-robot/0.1', 'me****@foo*****');
+  $ua->delay(10);  # be very nice -- max one hit every ten minutes!
+  ...
+
+  # Then just use it just like a normal LWP::UserAgent:
+  my $response = $ua->get('http://whatever.int/...');
+  ...
+
+=head1 DESCRIPTION
+
+=begin original
+
+This class implements a user agent that is suitable for robot
+applications.  Robots should be nice to the servers they visit.  They
+should consult the F</robots.txt> file to ensure that they are welcomed
+and they should not make requests too frequently.
+
+=end original
+
+このクラスはロボットアプリケーションに適したユーザーエージェントを実装します。
+ロボットは訪れるサーバにとってナイスでなければなりません。
+それらは F</robots.txt> を見て歓迎されていることを確認しなければなりません。
+そしてあまり頻繁にリクエストしてはいけません。
+
+=begin original
+
+But before you consider writing a robot, take a look at
+<URL:http://www.robotstxt.org/>.
+
+=end original
+
+しかし、ロボットを書くことを考える前に
+<URL:http://www.robotstxt.org/> を見てください。
+
+=begin original
+
+When you use a I<LWP::RobotUA> object as your user agent, then you do not
+really have to think about these things yourself; C<robots.txt> files
+are automatically consulted and obeyed, the server isn't queried
+too rapidly, and so on.  Just send requests
+as you do when you are using a normal I<LWP::UserAgent>
+object (using C<< $ua->get(...) >>, C<< $ua->head(...) >>,
+C<< $ua->request(...) >>, etc.), and this
+special agent will make sure you are nice.
+
+=end original
+
+I<LWP::RobotUA> をあなたのユーザーエージェントとして使うとき、
+実際の所これらのことについて考える必要はありません;
+C<robots.txt> files
+are automatically consulted and obeyed, the server isn't queried
+too rapidly, and so on.
+通常の I<LWP::UserAgent> を使って
+(C<< $ua->get(...) >>, C<< $ua->head(...) >>,
+C<< $ua->request(...) >> などを使って)
+好きなように単純にリクエストを送信すれば、
+この特別なエージェントはあなたがナイスであることを保証します。
+(TBT)
+
+=head1 METHODS
+
+(メソッド)
+
+=begin original
+
+The LWP::RobotUA is a sub-class of LWP::UserAgent and implements the
+same methods. In addition the following methods are provided:
+
+=end original
+
+LWP::RobotUA は LWP::UserAgent のサブクラスで、同じメソッドを実装しています。
+さらに以下のメソッドも提供されます:
+
+=over 4
+
+=item $ua = LWP::RobotUA->new( %options )
+
+=item $ua = LWP::RobotUA->new( $agent, $from )
+
+=item $ua = LWP::RobotUA->new( $agent, $from, $rules )
+
+=begin original
+
+The LWP::UserAgent options C<agent> and C<from> are mandatory.  The
+options C<delay>, C<use_sleep> and C<rules> initialize attributes
+private to the RobotUA.  If C<rules> are not provided, then
+C<WWW::RobotRules> is instantiated providing an internal database of
+F<robots.txt>.
+
+=end original
+
+The LWP::UserAgent options C<agent> and C<from> are mandatory.  The
+options C<delay>, C<use_sleep> and C<rules> initialize attributes
+private to the RobotUA.  If C<rules> are not provided, then
+C<WWW::RobotRules> is instantiated providing an internal database of
+F<robots.txt>.
+(TBT)
+
+=begin original
+
+It is also possible to just pass the value of C<agent>, C<from> and
+optionally C<rules> as plain positional arguments.
+
+=end original
+
+It is also possible to just pass the value of C<agent>, C<from> and
+optionally C<rules> as plain positional arguments.
+(TBT)
+
+=item $ua->delay
+
+=item $ua->delay( $minutes )
+
+=begin original
+
+Get/set the minimum delay between requests to the same server, in
+I<minutes>.  The default is 1 minute.  Note that this number doesn't
+have to be an integer; for example, this sets the delay to 10 seconds:
+
+=end original
+
+同じサーバへのリクエスト間の最小限の遅延(秒単位)を設定/取得します。
+デフォルトは 1 分です。
+Note that this number doesn't
+have to be an integer; for example, this sets the delay to 10 seconds:
+(TBT)
+
+    $ua->delay(10/60);
+
+=item $ua->use_sleep
+
+=item $ua->use_sleep( $boolean )
+
+=begin original
+
+Get/set a value indicating whether the UA should sleep() if requests
+arrive too fast, defined as $ua->delay minutes not passed since
+last request to the given server.  The default is TRUE.  If this value is
+FALSE then an internal SERVICE_UNAVAILABLE response will be generated.
+It will have an Retry-After header that indicates when it is OK to
+send another request to this server.
+
+=end original
+
+リクエストの到着があまりに早い (与えられたサーバーへの最後の
+リクエストから $ua->delay 分が経過していないかどうかで決定されます) とき、
+UA が sleep() するべきかどうかを示す値を取得/設定します。
+デフォルトは真です。
+もしこの値が偽であれば、内部の SERVICE_UNAVAILABLE が生成されます。
+このサーバに次のリクエストを送信することがいつになったら OK かを示す、
+Retry-After ヘッダを持ちます。
+
+=item $ua->rules
+
+=item $ua->rules( $rules )
+
+=begin original
+
+Set/get which I<WWW::RobotRules> object to use.
+
+=end original
+
+使用する I<WWW::RobotRules> オブジェクトの設定/取得します。
+
+=item $ua->no_visits( $netloc )
+
+=begin original
+
+Returns the number of documents fetched from this server host. Yeah I
+know, this method should probably have been named num_visits() or
+something like that. :-(
+
+=end original
+
+このサーバーホストから取り出されたドキュメントの数を返します。
+このメソッドが num_visits() とかなんとか名付けられるべきだってことは、
+わかっていますってば。:-(
+
+=item $ua->host_wait( $netloc )
+
+=begin original
+
+Returns the number of I<seconds> (from now) you must wait before you can
+make a new request to this host.
+
+=end original
+
+このホストへ新しいリクエストをすることができるまで、(今から) I<何秒>
+待たなければならないかを返します。
+
+=item $ua->as_string
+
+=begin original
+
+Returns a string that describes the state of the UA.
+Mainly useful for debugging.
+
+=end original
+
+UA の状態を示す文字列を返します。
+主にデバッグに役立ちます。
+
+=back
+
+=head1 SEE ALSO
+
+L<LWP::UserAgent>, L<WWW::RobotRules>
+
+=head1 COPYRIGHT
+
+Copyright 1996-2004 Gisle Aas.
+
+This library is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+=begin meta
+
+Translated: Hippo2000 <GCD00****@nifty*****> (5.48)
+Updated: Kentaro SHIRAKATA <argra****@ub32*****> (5.813)
+
+=end meta
+



perldocjp-cvs メーリングリストの案内
Back to archive index