[perldocjp-cvs 631] CVS update: docs/modules/libwww-perl-5.813/HTTP

Back to archive index

argra****@users***** argra****@users*****
2010年 7月 3日 (土) 03:24:23 JST


Index: docs/modules/libwww-perl-5.813/HTTP/Date.pod
diff -u /dev/null docs/modules/libwww-perl-5.813/HTTP/Date.pod:1.1
--- /dev/null	Sat Jul  3 03:24:23 2010
+++ docs/modules/libwww-perl-5.813/HTTP/Date.pod	Sat Jul  3 03:24:23 2010
@@ -0,0 +1,257 @@
+
+=encoding euc-jp
+
+=head1 NAME
+
+=begin original
+
+HTTP::Date - date conversion routines
+
+=end original
+
+HTTP::Date - 日付変換ルーチン
+
+=head1 SYNOPSIS
+
+ use HTTP::Date;
+
+ $string = time2str($time);    # Format as GMT ASCII time
+ $time = str2time($string);    # convert ASCII date to machine time
+
+=head1 DESCRIPTION
+
+=begin original
+
+This module provides functions that deal the date formats used by the
+HTTP protocol (and then some more).  Only the first two functions,
+time2str() and str2time(), are exported by default.
+
+=end original
+
+このモジュールは HTTP プロトコルによって使われる日付フォーマットを扱う関数を
+(そしてそれ以上のものを) 提供します。
+デフォルトでは最初の 2 つの関数、time2str() と str2time() だけが
+エクスポートされます。
+
+=over 4
+
+=item time2str( [$time] )
+
+=begin original
+
+The time2str() function converts a machine time (seconds since epoch)
+to a string.  If the function is called without an argument, it will
+use the current time.
+
+=end original
+
+time2str() 関数はマシン時刻 (紀元からの秒数) を文字列に変換します。
+もしこの関数が引数無しで呼ばれれば、現在時刻を使います。
+
+=begin original
+
+The string returned is in the format preferred for the HTTP protocol.
+This is a fixed length subset of the format defined by RFC 1123,
+represented in Universal Time (GMT).  An example of a time stamp
+in this format is:
+
+=end original
+
+文字列は、HTTP プロトコルに適したフォーマットで返されます。
+これは固定長で、RFC 1123 で定義されているサブセット、世界時刻 (GMT) で
+表されます。
+このフォーマットでのタイムスタンプの例を以下に示します:
+
+   Sun, 06 Nov 1994 08:49:37 GMT
+
+=item str2time( $str [, $zone] )
+
+=begin original
+
+The str2time() function converts a string to machine time.  It returns
+C<undef> if the format of $str is unrecognized, otherwise whatever the
+C<Time::Local> functions can make out of the parsed time.  Dates
+before the system's epoch may not work on all operating systems.  The
+time formats recognized are the same as for parse_date().
+
+=end original
+
+str2time() 関数は文字列をマシン時刻に変換します。
+もし $str のフォーマットが理解できなければ C<undef> を返し、
+otherwise whatever the
+C<Time::Local> functions can make out of the parsed time.  Dates
+before the system's epoch may not work on all operating systems.
+理解される時刻フォーマットは parse_date() と同じです。
+(TBT)
+
+=begin original
+
+The function also takes an optional second argument that specifies the
+default time zone to use when converting the date.  This parameter is
+ignored if the zone is found in the date string itself.  If this
+parameter is missing, and the date string format does not contain any
+zone specification, then the local time zone is assumed.
+
+=end original
+
+この関数は、日付を変換するときに使われるデフォルトの時間帯を指定する
+オプションの 2 番目の引数も取ることが出来ます。
+日付文字列自身に時間帯が見つかれば、このパラメータは無視されます。
+もしこのパラメータがなく、日付文字列のフォーマットに時間帯の指定が
+入っていなければ、ローカル時間帯が想定されます。
+
+=begin original
+
+If the zone is not "C<GMT>" or numerical (like "C<-0800>" or
+"C<+0100>"), then the C<Time::Zone> module must be installed in order
+to get the date recognized.
+
+=end original
+
+時間帯が "C<GMT>" でも ("C<-0800>" や "C<+0100>" のような) 数値でもなければ、
+日付を理解するために C<Time::Zone> モジュールが
+インストールされていなければなりません。
+
+=item parse_date( $str )
+
+=begin original
+
+This function will try to parse a date string, and then return it as a
+list of numerical values followed by a (possible undefined) time zone
+specifier; ($year, $month, $day, $hour, $min, $sec, $tz).  The $year
+returned will B<not> have the number 1900 subtracted from it and the
+$month numbers start with 1.
+
+=end original
+
+この関数は日付文字列を解析しようとし、(未定義かもしれない) 時間帯指定子に
+従って、数値のリストとして返します;
+($year, $month, $day, $hour, $min, $sec, $tz)。
+返される $year は 1900 を B<引かれない> 数値を持ち、
+$month は 1 から始まります。
+
+=begin original
+
+In scalar context the numbers are interpolated in a string of the
+"YYYY-MM-DD hh:mm:ss TZ"-format and returned.
+
+=end original
+
+スカラコンテキストでは "YYYY-MM-DD hh:mm:ss TZ" というフォーマットの
+文字列に展開され、返されます。
+
+=begin original
+
+If the date is unrecognized, then the empty list is returned.
+
+=end original
+
+日付が理解できなければ、空リストが返されます。
+
+=begin original
+
+The function is able to parse the following formats:
+
+=end original
+
+この関数は以下のフォーマットを解析することができます:
+
+ "Wed, 09 Feb 1994 22:23:32 GMT"       -- HTTP format
+ "Thu Feb  3 17:03:55 GMT 1994"        -- ctime(3) format
+ "Thu Feb  3 00:00:00 1994",           -- ANSI C asctime() format
+ "Tuesday, 08-Feb-94 14:15:29 GMT"     -- old rfc850 HTTP format
+ "Tuesday, 08-Feb-1994 14:15:29 GMT"   -- broken rfc850 HTTP format
+
+ "03/Feb/1994:17:03:55 -0700"   -- common logfile format
+ "09 Feb 1994 22:23:32 GMT"     -- HTTP format (no weekday)
+ "08-Feb-94 14:15:29 GMT"       -- rfc850 format (no weekday)
+ "08-Feb-1994 14:15:29 GMT"     -- broken rfc850 format (no weekday)
+
+ "1994-02-03 14:15:29 -0100"    -- ISO 8601 format
+ "1994-02-03 14:15:29"          -- zone is optional
+ "1994-02-03"                   -- only date
+ "1994-02-03T14:15:29"          -- Use T as separator
+ "19940203T141529Z"             -- ISO 8601 compact format
+ "19940203"                     -- only date
+
+ "08-Feb-94"         -- old rfc850 HTTP format    (no weekday, no time)
+ "08-Feb-1994"       -- broken rfc850 HTTP format (no weekday, no time)
+ "09 Feb 1994"       -- proposed new HTTP format  (no weekday, no time)
+ "03/Feb/1994"       -- common logfile format     (no time, no offset)
+
+ "Feb  3  1994"      -- Unix 'ls -l' format
+ "Feb  3 17:03"      -- Unix 'ls -l' format
+
+ "11-15-96  03:52PM" -- Windows 'dir' format
+
+=begin original
+
+The parser ignores leading and trailing whitespace.  It also allow the
+seconds to be missing and the month to be numerical in most formats.
+
+=end original
+
+パーサは前や後ろについた空白を無視します。
+またほとんどのフォーマットで秒を指定しなかったり、月を
+数字で指定することも許します。
+
+=begin original
+
+If the year is missing, then we assume that the date is the first
+matching date I<before> current month.  If the year is given with only
+2 digits, then parse_date() will select the century that makes the
+year closest to the current date.
+
+=end original
+
+もし年 (year) がなければ、日付は、現在の月より前で最初にマッチした
+日付であると想定します。
+年が 2 桁だけで指定されれば、parse_date() はその年が、現在の時刻に最も
+近くなるような世紀を選びます。
+
+=item time2iso( [$time] )
+
+=begin original
+
+Same as time2str(), but returns a "YYYY-MM-DD hh:mm:ss"-formatted
+string representing time in the local time zone.
+
+=end original
+
+time2str() と同じですが、しかしローカル時間帯での時刻を表す、
+"YYYY-MM-DD hh:mm:ss" でフォーマットされた文字列を返します。
+
+=item time2isoz( [$time] )
+
+=begin original
+
+Same as time2str(), but returns a "YYYY-MM-DD hh:mm:ssZ"-formatted
+string representing Universal Time.
+
+=end original
+
+time2str() と同じですが、しかし世界時を表す、
+"YYYY-MM-DD hh:mm:ssZ" でフォーマットされた文字列を返します。
+
+=back
+
+=head1 SEE ALSO
+
+L<perlfunc/time>, L<Time::Zone>
+
+=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
+
+=cut
+
Index: docs/modules/libwww-perl-5.813/HTTP/Message.pod
diff -u /dev/null docs/modules/libwww-perl-5.813/HTTP/Message.pod:1.1
--- /dev/null	Sat Jul  3 03:24:23 2010
+++ docs/modules/libwww-perl-5.813/HTTP/Message.pod	Sat Jul  3 03:24:23 2010
@@ -0,0 +1,584 @@
+
+=encoding euc-jp
+
+=head1 NAME
+
+=begin original
+
+HTTP::Message - HTTP style message (base class)
+
+=end original
+
+HTTP::Message - HTTP 形式のメッセージ (基底クラス)
+
+=head1 SYNOPSIS
+
+ use base 'HTTP::Message';
+
+=head1 DESCRIPTION
+
+=begin original
+
+An C<HTTP::Message> object contains some headers and a content body.
+The following methods are available:
+
+=end original
+
+C<HTTP::Message> オブジェクトには幾つかのヘッダとコンテンツの本体が
+入っています。
+以下のメソッドが利用できます:
+
+=over 4
+
+=item $mess = HTTP::Message->new
+
+=item $mess = HTTP::Message->new( $headers )
+
+=item $mess = HTTP::Message->new( $headers, $content )
+
+=begin original
+
+This constructs a new message object.  Normally you would want
+construct C<HTTP::Request> or C<HTTP::Response> objects instead.
+
+=end original
+
+これは新しいメッセージオブジェクトを構築します。
+普通は代わりに C<HTTP::Request> または C<HTTP::Response> オブジェクトを
+構築したいでしょう。
+
+=begin original
+
+The optional $header argument should be a reference to an
+C<HTTP::Headers> object or a plain array reference of key/value pairs.
+If an C<HTTP::Headers> object is provided then a copy of it will be
+embedded into the constructed message, i.e. it will not be owned and
+can be modified afterwards without affecting the message.
+
+=end original
+
+The optional $header argument should be a reference to an
+C<HTTP::Headers> object or a plain array reference of key/value pairs.
+If an C<HTTP::Headers> object is provided then a copy of it will be
+embedded into the constructed message, i.e. it will not be owned and
+can be modified afterwards without affecting the message.
+(TBT)
+
+=begin original
+
+The optional $content argument should be a string of bytes.
+
+=end original
+
+The optional $content argument should be a string of bytes.
+(TBT)
+
+=item $mess = HTTP::Message->parse( $str )
+
+=begin original
+
+This constructs a new message object by parsing the given string.
+
+=end original
+
+This constructs a new message object by parsing the given string.
+(TBT)
+
+=item $mess->headers
+
+=begin original
+
+Returns the embedded C<HTTP::Headers> object.
+
+=end original
+
+埋め込まれた C<HTTP::Headers> オブジェクトを返します。
+
+=item $mess->headers_as_string
+
+=item $mess->headers_as_string( $eol )
+
+=begin original
+
+Call the as_string() method for the headers in the
+message.  This will be the same as
+
+=end original
+
+メッセージの中のヘッダのために as_string() を呼び出します。
+This will be the same as
+(TBT)
+
+    $mess->headers->as_string
+
+=begin original
+
+but it will make your program a whole character shorter :-)
+
+=end original
+
+but it will make your program a whole character shorter :-)
+(TBT)
+
+=item $mess->content
+
+=item $mess->content( $bytes )
+
+=begin original
+
+The content() method sets the raw content if an argument is given.  If no
+argument is given the content is not touched.  In either case the
+original raw content is returned.
+
+=end original
+
+引数が与えられていれば、content() メソッドは生のコンテンツを設定します。
+引数が与えられなければ、コンテンツは触られません。
+いずれの場合も元の生のコンテンツは返されます。
+
+=begin original
+
+Note that the content should be a string of bytes.  Strings in perl
+can contain characters outside the range of a byte.  The C<Encode>
+module can be used to turn such strings into a string of bytes.
+
+=end original
+
+Note that the content should be a string of bytes.  Strings in perl
+can contain characters outside the range of a byte.  The C<Encode>
+module can be used to turn such strings into a string of bytes.
+(TBT)
+
+=item $mess->add_content( $bytes )
+
+=begin original
+
+The add_content() methods appends more data bytes to the end of the
+current content buffer.
+
+=end original
+
+add_content() メソッドは現在のコンテンツの末尾にさらにバイトデータを
+追加します。
+
+=item $mess->add_content_utf8( $string )
+
+=begin original
+
+The add_content_utf8() method appends the UTF-8 bytes representing the
+string to the end of the current content buffer.
+
+=end original
+
+The add_content_utf8() method appends the UTF-8 bytes representing the
+string to the end of the current content buffer.
+(TBT)
+
+=item $mess->content_ref
+
+=item $mess->content_ref( \$bytes )
+
+=begin original
+
+The content_ref() method will return a reference to content buffer string.
+It can be more efficient to access the content this way if the content
+is huge, and it can even be used for direct manipulation of the content,
+for instance:
+
+=end original
+
+content_ref() メソッドはコンテンツバッファ文字列へのリファレンスを返します。
+コンテンツが巨大であれば、この方法でコンテンツにアクセスするのはより
+効率的かもしれません。
+そしてコンテンツの直接操作するためにすら使うことが出来ます。
+例えば:
+
+  ${$res->content_ref} =~ s/\bfoo\b/bar/g;
+
+=begin original
+
+This example would modify the content buffer in-place.
+
+=end original
+
+This example would modify the content buffer in-place.
+(TBT)
+
+=begin original
+
+If an argument is passed it will setup the content to reference some
+external source.  The content() and add_content() methods
+will automatically dereference scalar references passed this way.  For
+other references content() will return the reference itself and
+add_content() will refuse to do anything.
+
+=end original
+
+If an argument is passed it will setup the content to reference some
+external source.  The content() and add_content() methods
+will automatically dereference scalar references passed this way.  For
+other references content() will return the reference itself and
+add_content() will refuse to do anything.
+(TBT)
+
+=item $mess->decoded_content( %options )
+
+=begin original
+
+Returns the content with any C<Content-Encoding> undone and the raw
+content encoded to perl's Unicode strings.  If the C<Content-Encoding>
+or C<charset> of the message is unknown this method will fail by
+returning C<undef>.
+
+=end original
+
+Returns the content with any C<Content-Encoding> undone and the raw
+content encoded to perl's Unicode strings.  If the C<Content-Encoding>
+or C<charset> of the message is unknown this method will fail by
+returning C<undef>.
+(TBT)
+
+=begin original
+
+The following options can be specified.
+
+=end original
+
+The following options can be specified.
+(TBT)
+
+=over
+
+=item C<charset>
+
+=begin original
+
+This override the charset parameter for text content.  The value
+C<none> can used to suppress decoding of the charset.
+
+=end original
+
+This override the charset parameter for text content.  The value
+C<none> can used to suppress decoding of the charset.
+(TBT)
+
+=item C<default_charset>
+
+=begin original
+
+This override the default charset of "ISO-8859-1".
+
+=end original
+
+This override the default charset of "ISO-8859-1".
+(TBT)
+
+=item C<charset_strict>
+
+=begin original
+
+Abort decoding if malformed characters is found in the content.  By
+default you get the substitution character ("\x{FFFD}") in place of
+malformed characters.
+
+=end original
+
+Abort decoding if malformed characters is found in the content.  By
+default you get the substitution character ("\x{FFFD}") in place of
+malformed characters.
+(TBT)
+
+=item C<raise_error>
+
+=begin original
+
+If TRUE then raise an exception if not able to decode content.  Reason
+might be that the specified C<Content-Encoding> or C<charset> is not
+supported.  If this option is FALSE, then decoded_content() will return
+C<undef> on errors, but will still set $@.
+
+=end original
+
+If TRUE then raise an exception if not able to decode content.  Reason
+might be that the specified C<Content-Encoding> or C<charset> is not
+supported.  If this option is FALSE, then decoded_content() will return
+C<undef> on errors, but will still set $@.
+(TBT)
+
+=item C<ref>
+
+=begin original
+
+If TRUE then a reference to decoded content is returned.  This might
+be more efficient in cases where the decoded content is identical to
+the raw content as no data copying is required in this case.
+
+=end original
+
+If TRUE then a reference to decoded content is returned.  This might
+be more efficient in cases where the decoded content is identical to
+the raw content as no data copying is required in this case.
+(TBT)
+
+=back
+
+=item $mess->parts
+
+=item $mess->parts( @parts )
+
+=item $mess->parts( \@parts )
+
+=begin original
+
+Messages can be composite, i.e. contain other messages.  The composite
+messages have a content type of C<multipart/*> or C<message/*>.  This
+method give access to the contained messages.
+
+=end original
+
+Messages can be composite, i.e. contain other messages.  The composite
+messages have a content type of C<multipart/*> or C<message/*>.  This
+method give access to the contained messages.
+(TBT)
+
+=begin original
+
+The argumentless form will return a list of C<HTTP::Message> objects.
+If the content type of $msg is not C<multipart/*> or C<message/*> then
+this will return the empty list.  In scalar context only the first
+object is returned.  The returned message parts should be regarded as
+are read only (future versions of this library might make it possible
+to modify the parent by modifying the parts).
+
+=end original
+
+The argumentless form will return a list of C<HTTP::Message> objects.
+If the content type of $msg is not C<multipart/*> or C<message/*> then
+this will return the empty list.  In scalar context only the first
+object is returned.  The returned message parts should be regarded as
+are read only (future versions of this library might make it possible
+to modify the parent by modifying the parts).
+(TBT)
+
+=begin original
+
+If the content type of $msg is C<message/*> then there will only be
+one part returned.
+
+=end original
+
+If the content type of $msg is C<message/*> then there will only be
+one part returned.
+(TBT)
+
+=begin original
+
+If the content type is C<message/http>, then the return value will be
+either an C<HTTP::Request> or an C<HTTP::Response> object.
+
+=end original
+
+If the content type is C<message/http>, then the return value will be
+either an C<HTTP::Request> or an C<HTTP::Response> object.
+(TBT)
+
+=begin original
+
+If an @parts argument is given, then the content of the message will be
+modified. The array reference form is provided so that an empty list
+can be provided.  The @parts array should contain C<HTTP::Message>
+objects.  The @parts objects are owned by $mess after this call and
+should not be modified or made part of other messages.
+
+=end original
+
+If an @parts argument is given, then the content of the message will be
+modified. The array reference form is provided so that an empty list
+can be provided.  The @parts array should contain C<HTTP::Message>
+objects.  The @parts objects are owned by $mess after this call and
+should not be modified or made part of other messages.
+(TBT)
+
+=begin original
+
+When updating the message with this method and the old content type of
+$mess is not C<multipart/*> or C<message/*>, then the content type is
+set to C<multipart/mixed> and all other content headers are cleared.
+
+=end original
+
+When updating the message with this method and the old content type of
+$mess is not C<multipart/*> or C<message/*>, then the content type is
+set to C<multipart/mixed> and all other content headers are cleared.
+(TBT)
+
+=begin original
+
+This method will croak if the content type is C<message/*> and more
+than one part is provided.
+
+=end original
+
+This method will croak if the content type is C<message/*> and more
+than one part is provided.
+(TBT)
+
+=item $mess->add_part( $part )
+
+=begin original
+
+This will add a part to a message.  The $part argument should be
+another C<HTTP::Message> object.  If the previous content type of
+$mess is not C<multipart/*> then the old content (together with all
+content headers) will be made part #1 and the content type made
+C<multipart/mixed> before the new part is added.  The $part object is
+owned by $mess after this call and should not be modified or made part
+of other messages.
+
+=end original
+
+This will add a part to a message.  The $part argument should be
+another C<HTTP::Message> object.  If the previous content type of
+$mess is not C<multipart/*> then the old content (together with all
+content headers) will be made part #1 and the content type made
+C<multipart/mixed> before the new part is added.  The $part object is
+owned by $mess after this call and should not be modified or made part
+of other messages.
+(TBT)
+
+=begin original
+
+There is no return value.
+
+=end original
+
+There is no return value.
+(TBT)
+
+=item $mess->clear
+
+=begin original
+
+Will clear the headers and set the content to the empty string.  There
+is no return value
+
+=end original
+
+Will clear the headers and set the content to the empty string.  There
+is no return value
+(TBT)
+
+=item $mess->protocol
+
+=item $mess->protocol( $proto )
+
+=begin original
+
+Sets the HTTP protocol used for the message.  The protocol() is a string
+like C<HTTP/1.0> or C<HTTP/1.1>.
+
+=end original
+
+そのメッセージに使われる HTTP プロトコルを設定します。
+protocol() は C<HTTP/1.0> や C<HTTP/1.1> のような文字列です。
+
+=item $mess->clone
+
+=begin original
+
+Returns a copy of the message object.
+
+=end original
+
+メッセージオブジェクトのコピーを返します。
+
+=item $mess->as_string
+
+=item $mess->as_string( $eol )
+
+=begin original
+
+Returns the message formatted as a single string.
+
+=end original
+
+Returns the message formatted as a single string.
+(TBT)
+
+=begin original
+
+The optional $eol parameter specifies the line ending sequence to use.
+The default is "\n".  If no $eol is given then as_string will ensure
+that the returned string is newline terminated (even when the message
+content is not).  No extra newline is appended if an explicit $eol is
+passed.
+
+=end original
+
+The optional $eol parameter specifies the line ending sequence to use.
+The default is "\n".  If no $eol is given then as_string will ensure
+that the returned string is newline terminated (even when the message
+content is not).  No extra newline is appended if an explicit $eol is
+passed.
+(TBT)
+
+=back
+
+=begin original
+
+All methods unknown to C<HTTP::Message> itself are delegated to the
+C<HTTP::Headers> object that is part of every message.  This allows
+convenient access to these methods.  Refer to L<HTTP::Headers> for
+details of these methods:
+
+=end original
+
+C<HTTP::Message> 自身が分からないすべてのメソッドは、
+代わりに各メッセージの一部である C<HTTP::Headers> オブジェクトに
+委譲されます。
+これは以下の便利メソッドへのアクセスを可能にします。
+これらのメソッドについての詳細は C<HTTP::Headers> を参照してください。
+
+    $mess->header( $field => $val )
+    $mess->push_header( $field => $val )
+    $mess->init_header( $field => $val )
+    $mess->remove_header( $field )
+    $mess->remove_content_headers
+    $mess->header_field_names
+    $mess->scan( \&doit )
+
+    $mess->date
+    $mess->expires
+    $mess->if_modified_since
+    $mess->if_unmodified_since
+    $mess->last_modified
+    $mess->content_type
+    $mess->content_encoding
+    $mess->content_length
+    $mess->content_language
+    $mess->title
+    $mess->user_agent
+    $mess->server
+    $mess->from
+    $mess->referer
+    $mess->www_authenticate
+    $mess->authorization
+    $mess->proxy_authorization
+    $mess->authorization_basic
+    $mess->proxy_authorization_basic
+
+=head1 COPYRIGHT
+
+Copyright 1995-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