[perldocjp-cvs 1666] CVS update: docs/modules/version-0.77

Back to archive index

argra****@users***** argra****@users*****
2012年 12月 19日 (水) 03:50:41 JST


Index: docs/modules/version-0.77/version.pod
diff -u docs/modules/version-0.77/version.pod:1.1 docs/modules/version-0.77/version.pod:1.2
--- docs/modules/version-0.77/version.pod:1.1	Thu Dec  6 00:52:42 2012
+++ docs/modules/version-0.77/version.pod	Wed Dec 19 03:50:41 2012
@@ -7,7 +7,7 @@
 
 =end original
 
-version - バージョンオブジェクトのための Perl 拡張
+version - バージョンオブジェクトのための Perl エクステンション
 
 =head1 SYNOPSIS
 
@@ -50,18 +50,22 @@
 
 =end original
 
-Version objects were added to Perl in 5.10.  This module implements version
-objects for older version of Perl and provides the version object API for all
-versions of Perl.  All previous releases before 0.74 are deprecated and should
-not be used due to incompatible API changes.  Version 0.77 introduces the new
-'parse' and 'declare' methods to standardize usage.  You are strongly urged to
-set 0.77 as a minimum in your code, e.g. 
-(TBT)
+バージョンオブジェクトは 5.10 で Perl に追加されました。
+このモジュールは古いバージョンの Perl のためのバージョンオブジェクトを
+実装し、全てのバージョンの Perl のためのバージョンオブジェクト API を
+提供します。
+0.74 以前の全てのリリースは廃止予定で、互換性のない API の変更のため
+使われるべきではありません。
+バージョン 0.77 から使用法を標準化するために 'parse' と 'declare' が
+導入されました。
+コードに最低バージョンとして 0.77 を設定することを強く主張します; 例えば
 
   use version 0.77; # even for Perl v.5.10.0
 
 =head1 TYPES OF VERSION OBJECTS
 
+(バージョンオブジェクトの種類)
+
 =begin original
 
 There are two different types of version objects, corresponding to the two
@@ -69,14 +73,15 @@
 
 =end original
 
-There are two different types of version objects, corresponding to the two
-different styles of versions in use:
-(TBT)
+バージョンの二つの異なった使用形式に対応して、二つの異なった
+バージョンオブジェクトの種類があります。
 
 =over 2
 
 =item Decimal Versions
 
+(10 進数バージョン)
+
 =begin original
 
 The classic floating-point number $VERSION.  The advantage to this style is
@@ -85,13 +90,14 @@
 
 =end original
 
-The classic floating-point number $VERSION.  The advantage to this style is
-that you don't need to do anything special, just type a number (without
-quotes) into your source file.
-(TBT)
+クラシックな浮動小数点数 $VERSION。
+この形式の利点は何も特殊なことをする必要はなく、単にソースファイルに
+番号を(クォートなしで)書くだけです。
 
 =item Dotted Decimal Versions
 
+(ドット付き 10 進数バージョン)
+
 =begin original
 
 The more modern form of version assignment, with 3 (or potentially more)
@@ -102,12 +108,11 @@
 
 =end original
 
-The more modern form of version assignment, with 3 (or potentially more)
-integers seperated by decimal points (e.g. v1.2.3).  This is the form that
-Perl itself has used since 5.6.0 was released.  The leading "v" is now 
-strongly recommended for clarity, and will throw a warning in a future
-release if omitted.
-(TBT)
+バージョン割り当てのより近代的な形式で、3 (または潜在的にはそれ以上) の
+整数を小数点で区切ったものです (例えば v1.2.3)。
+これは Perl 自身が 5.6.0 がリリースされてから使っている形式です。
+先頭の "v" は現在では明確化のために強く推奨されていて、これがないと
+将来のリリースでは警告を投げます。
 
 =back
 
@@ -117,11 +122,12 @@
 
 =end original
 
-See L<VERSION OBJECT DETAILS> for further information.
-(TBT)
+さらなる情報については L<VERSION OBJECT DETAILS> を参照してください。
 
 =head1 DECLARING VERSIONS
 
+(バージョンの宣言)
+
 =begin original
 
 If you have a module that uses a decimal $VERSION (floating point), and you
@@ -130,10 +136,9 @@
 
 =end original
 
-If you have a module that uses a decimal $VERSION (floating point), and you
-do not intend to ever change that, this module is not for you.  There is
-nothing that version.pm gains you over a simple $VERSION assignment:
-(TBT)
+10 進数 $VERSION (浮動小数点数) を使うモジュールがあって、変更するつもりが
+ないなら、このモジュールはあなたのためのものではありません。
+単純な $VERSION 代入に対して version.pm から得られる利点はありません:
 
   our $VERSION = 1.02;
 
@@ -144,12 +149,13 @@
 
 =end original
 
-Since Perl v5.10.0 includes the version.pm comparison logic anyways, 
-you don't need to do anything at all.
-(TBT)
+Perl v5.10.0 からはどちらにしろ version.pm 比較ロジックを含んでいるので、
+全く何もする必要はありません。
 
 =head2 How to convert a module from decimal to dotted-decimal
 
+(10 進数からドット付き 10 進数へのモジュールの変換方法)
+
 =begin original
 
 If you have used a decimal $VERSION in the past and wish to switch to a
@@ -158,10 +164,8 @@
 
 =end original
 
-If you have used a decimal $VERSION in the past and wish to switch to a
-dotted-decimal $VERSION, then you need to make a one-time conversion to
-the new format. 
-(TBT)
+過去に 10 進数 $VERSION を使っていて、ドット付き 10 進数 $VERSION に
+切り替えたいなら、一度だけ新しい形式に変換する必要があります。
 
 =begin original
 
@@ -172,11 +176,10 @@
 
 =end original
 
-B<Important Note>: you must ensure that your new $VERSION is numerically
-greater than your current decimal $VERSION; this is not always obvious. First,
-convert your old decimal version (e.g. 1.02) to a normalized dotted-decimal
-form:
-(TBT)
+B<重要な注意>: 新しい $VERSION は数値的に現在の 10 進数 $VERSION より
+大きくしなければなりません; これは常に自明というわけではありません。
+最初に、古い 10 進数バージョン (例えば 1.02) をドット付き 10 進数形式に
+変換します:
 
   $ perl -Mversion -e 'print version->parse("1.02")->normal'
   v1.20.0
@@ -187,11 +190,13 @@
 
 =end original
 
-Then increment any of the dotted-decimal components (v1.20.1 or v1.21.0).
-(TBT)
+それからドット付き 10 進数の要素のどれかをインクリメントします
+(v1.20.1 または v1.21.0)。
 
 =head2 How to C<declare()> a dotted-decimal version
 
+(ドット付き 10 進数バージョンを C<declare()> する方法)
+
   use version 0.77; our $VERSION = version->declare("v1.2.3");
 
 =begin original
@@ -205,13 +210,15 @@
 
 =end original
 
-The C<declare()> method always creates dotted-decimal version objects.  When
-used in a module, you B<must> put it on the same line as "use version" to
-ensure that $VERSION is read correctly by PAUSE and installer tools.  You
-should also add 'version' to the 'configure_requires' section of your
-module metadata file.  See instructions in L<ExtUtils::MakeMaker> or
-L<Module::Build> for details.
-(TBT)
+C<declare()> メソッドは常にドット付き 10 進数バージョンオブジェクトを
+作成します。
+モジュールで使うときは、PAUSE やインストーラツールによって $VERSION が
+正しく読み込まれるように "use version" と同じ行に
+B<書かなければなりません>。
+また、モジュールメタデータファイルの 'configure_requires' 節に 'version' を
+追加するべきです。
+詳細については L<ExtUtils::MakeMaker> または L<Module::Build> の説明を
+参照してください。
 
 =begin original
 
@@ -221,10 +228,10 @@
 
 =end original
 
-B<Important Note>: Even if you pass in what looks like a decimal number
-("1.2"), a dotted-decimal will be created ("v1.200.0"). To avoid confusion
-or unintentional errors on older Perls, follow these guidelines:
-(TBT)
+B<重要な注意>: 例え 10 進数のように見えるもの ("1.2") を渡しても、ドット付き
+10 進数 ("v1.200.0") が作成されます。
+古い Perl での混乱や意図しないエラーを防ぐために、以下のガイドラインに
+従ってください:
 
 =over 2
 
@@ -236,8 +243,7 @@
 
 =end original
 
-Always use a dotted-decimal with (at least) three components
-(TBT)
+常に (少なくとも) 3 要素のあるドット付き 10 進数を使う
 
 =item *
 
@@ -247,8 +253,7 @@
 
 =end original
 
-Always use a leading-v
-(TBT)
+常に先頭の v を使う
 
 =item *
 
@@ -258,8 +263,7 @@
 
 =end original
 
-Always quote the version
-(TBT)
+常にバージョンをクォートする
 
 =back
 
@@ -271,10 +275,9 @@
 
 =end original
 
-If you really insist on using version.pm with an ordinary decimal version,
-use C<parse()> instead of declare.  See the L<PARSING AND COMPARING VERSIONS>
-for details.
-(TBT)
+本当に version.pm を普通の 10 進数バージョンで使うことにこだわるなら、
+declare の代わりに C<parse()> を使ってください。
+詳しくは L<PARSING AND COMPARING VERSIONS> を参照してください。
 
 =begin original
 
@@ -284,13 +287,14 @@
 
 =end original
 
-See also L<VERSION OBJECT DETAILS> for more on version number conversion,
-quoting, calculated version numbers and declaring developer or "alpha" version
-numbers.
-(TBT)
+バージョン番号変換、クォート、バージョン番号の計算、開発者バージョンや
+「α」バージョン番号の宣言に関してさらなる情報は L<VERSION OBJECT DETAILS> も
+参照してください。
 
 =head1 PARSING AND COMPARING VERSIONS
 
+(バージョンのパースと比較)
+
 =begin original
 
 If you need to compare version numbers, but can't be sure whether they are
@@ -299,13 +303,14 @@
 
 =end original
 
-If you need to compare version numbers, but can't be sure whether they are
-expressed as numbers, strings, v-strings or version objects,  then you can
-use version.pm to parse them all into objects for comparison.
-(TBT)
+バージョン番号を比較する必要があるけれども、バージョン番号が数値なのか
+文字列なのかv-文字列なのかバージョンオブジェクトなのか分からない場合、
+これら全てを比較のためにパースするために version.pm を使えます。
 
 =head2 How to C<parse()> a version
 
+(バージョンの C<parse()> の方法)
+
 =begin original
 
 The C<parse()> method takes in anything that might be a version and returns
@@ -313,9 +318,8 @@
 
 =end original
 
-The C<parse()> method takes in anything that might be a version and returns
-a corresponding version object, doing any necessary conversion along the way.
-(TBT)
+C<parse()> メソッドはバージョンになりそうなもの何でもを取って、必要な
+変換を行って、対応するバージョンオブジェクトを返します。
 
 =over 2
 
@@ -330,11 +334,9 @@
 
 =end original
 
-Dotted-decimal: bare v-strings (v1.2.3) and strings with more than one
-decimal point and a leading 'v' ("v1.2.3"); NOTE you can technically use a
-v-string or strings with a leading-v and only one decimal point (v1.2 or
-"v1.2"), but you will confuse both yourself and others.
-(TBT)
+ドット付き 10 進数: 裸のv-文字列 (v1.2.3) と先頭の 'v' と複数の小数点がある
+文字列 ("v1.2.3"); 注意: 技術的には小数点が一つしかないv-文字列や文字列
+(v1.2 や "v1.2") も使えますが、自分自身も他人も混乱させます。
 
 =item *
 
@@ -344,8 +346,7 @@
 
 =end original
 
-Decimal: regular decimal numbers (literal or in a string)
-(TBT)
+10 進数: (リテラルまたは文字列の中の) 普通の 10 進数
 
 =back
 
@@ -355,8 +356,7 @@
 
 =end original
 
-Some examples:
-(TBT)
+いくつかの例:
 
   $variable   version->parse($variable)
   ---------   -------------------------
@@ -373,11 +373,13 @@
 
 =end original
 
-See L<VERSION OBJECT DETAILS> for more on version number conversion.
-(TBT)
+さらなるバージョン番号変換については L<VERSION OBJECT DETAILS> を
+参照してください。
 
 =head2 How to compare version objects
 
+(バージョンオブジェクトの比較の方法)
+
 =begin original
 
 Version objects overload the C<cmp> and C<< E<lt>=E<gt> >> operators.  Perl
@@ -386,10 +388,10 @@
 
 =end original
 
-Version objects overload the C<cmp> and C<< E<lt>=E<gt> >> operators.  Perl
-automatically generates all of the other comparison operators based on those
-two so all the normal logical comparisons will work.
-(TBT)
+バージョンオブジェクトは C<cmp> と C<< E<lt>=E<gt> >> の演算子を
+オーバーロードします。
+Perl はこの二つから自動的にその他の比較演算子を生成するので、通常の論理比較は
+動作します。
 
   if ( version->parse($v1) == version->parse($v2) ) {
     # do stuff
@@ -403,10 +405,9 @@
 
 =end original
 
-If a version object is compared against a non-version object, the non-object
-term will be converted to a version object using C<parse()>.  This may give
-surprising results:
-(TBT)
+バージョンオブジェクトがバージョンオブジェクトでないものと比較されると、
+非オブジェクト側は C<parse()> を使ってバージョンオブジェクトに変換されます。
+これにより驚くべき結果になるかもしれません:
 
   $v1 = version->parse("v0.95.0");
   $bool = $v1 < 0.96; # FALSE since 0.96 is v0.960.0
@@ -417,15 +418,18 @@
 
 =end original
 
-Always comparing to a version object will help avoid surprises:
-(TBT)
+常にバージョンオブジェクトの比較を行うことは驚くことを避ける助けになります:
 
   $bool = $v1 < version->parse("v0.96.0"); # TRUE
 
 =head1 VERSION OBJECT DETAILS
 
+(バージョンオブジェクトの詳細)
+
 =head2 Equivalence between Decimal and Dotted-Decimal Versions
 
+(10 進数バージョンとドット付き 10 進数バージョンの等価性)
+
 =begin original
 
 When Perl 5.6.0 was released, the decision was made to provide a
@@ -434,10 +438,8 @@
 
 =end original
 
-When Perl 5.6.0 was released, the decision was made to provide a
-transformation between the old-style decimal versions and new-style
-dotted-decimal versions:
-(TBT)
+Perl 5.6.0 がリリースされたとき、古い形式の 10 進数バージョンと新しい形式の
+ドット付き 10 進数バージョンの変換を提供するという決定がなされました:
 
   5.6.0    == 5.006000
   5.005_04 == 5.5.40
@@ -451,11 +453,9 @@
 
 =end original
 
-The floating point number is taken and split first on the single decimal
-place, then each group of three digits to the right of the decimal makes up
-the next digit, and so on until the number of significant digits is exhausted,
-B<plus> enough trailing zeros to reach the next multiple of three.
-(TBT)
+浮動小数点数を取って、まず小数点で分割し、それから小数点の右側の 3 桁の
+グループ毎に次の数値にして、有効数字がなくなるまでこれを繰り返し、B<さらに>
+3 の倍数になるように末尾に 0 を追加します。
 
 =begin original
 
@@ -464,9 +464,8 @@
 
 =end original
 
-This was the method that version.pm adopted as well.  Some examples may be
-helpful:
-(TBT)
+これは version.pm が採用している方法でもあります。
+いくつかの例が助けになるでしょう:
 
                             equivalent
   decimal    zero-padded    dotted-decimal
@@ -480,6 +479,8 @@
 
 =head2 Quoting rules
 
+(クォート規則)
+
 =begin original
 
 Because of the nature of the Perl parsing and tokenizing routines,
@@ -492,14 +493,12 @@
 
 =end original
 
-Because of the nature of the Perl parsing and tokenizing routines,
-certain initialization values B<must> be quoted in order to correctly
-parse as the intended version, especially when using the L<declare> or
-L<qv> methods.  While you do not have to quote decimal numbers when
-creating version objects, it is always safe to quote B<all> initial values
-when using version.pm methods, as this will ensure that what you type is
-what is used.
-(TBT)
+Perl のパースとトークン化ルーチンの性質により、一部の初期化値は意図している
+バージョンとして正しくパースするためにクォート B<されなければなりません>;
+特に L<declare> や L<qv> メソッドではです。
+バージョンオブジェクトを作成するときに 10 進数をクォートする必要がない一方、
+version.pm メソッドを使うときに B<全ての> 初期値をクォートすることは常に
+安全です; 入力したものがどのように使われるかを確実にするからです。
 
 =begin original
 
@@ -510,11 +509,11 @@
 
 =end original
 
-Additionally, if you quote your initializer, then the quoted value that goes
-B<in> will be be exactly what comes B<out> when your $VERSION is printed
-(stringified).  If you do not quote your value, Perl's normal numeric handling
-comes into play and you may not get back what you were expecting.
-(TBT)
+さらに、初期化子をクォートする場合、B<入力> としてクォートされた値は
+$VERSION が表示される(文字列化される)ときに正確に同じものが
+B<出力> されます。
+値をクォートしていない場合、Perl の通常の数値の処理が行われ、想定したものに
+戻らないかもしれません。
 
 =begin original
 
@@ -525,11 +524,11 @@
 
 =end original
 
-If you use a mathematic formula that resolves to a floating point number,
-you are dependent on Perl's conversion routines to yield the version you
-expect.  You are pretty safe by dividing by a power of 10, for example,
-but other operations are not likely to be what you intend.  For example:
-(TBT)
+浮動小数点数になる数値演算を行った場合、想定したバージョンが生成されるかは
+Perl の変換ルーチンに依存します。
+例えば、10 の累乗で割ることはかなり安全ですが、その他の演算はおそらく
+意図した通りにはなりません。
+例えば:
 
   $VERSION = version->new((qw$Revision: 1.4)[1]/10);
   print $VERSION;          # yields 0.14
@@ -543,9 +542,9 @@
 
 =end original
 
-Perl 5.8.1 and beyond are able to automatically quote v-strings but
-that is not possible in earlier versions of Perl.  In other words:
-(TBT)
+Perl 5.8.1 以降は自動的にv-文字列をクォートできますが、それ以前の Perl では
+できません。
+言い換えると:
 
   $version = version->new("v2.5.4");  # legal in all versions of Perl
   $newvers = version->new(v2.5.4);    # legal only in Perl >= 5.8.1
@@ -581,10 +580,8 @@
 
 しかしながら、バージョンオブジェクトを初期化するために裸のv-文字列を
 使用することは、どのような状況であっても B<強く> 非推奨です。
-Also, bare
-v-strings are not completely supported in any version of Perl prior to
-5.8.1.
-(TBT)
+また、裸の v-文字列は 5.8.1 より前のバージョンの Perl は完全には
+対応していません。
 
 =begin original
 
@@ -653,12 +650,9 @@
 CPAN を使用しているモジュール作者の間で、不安定なリリースを示すために
 バージョン文字列内にアンダースコアを付ける慣習ができています。
 (L<CPAN> を参照。)
-version.pm はこの関連に従い、αリリースは、その直前の安定リリースよりも
+version.pm はこの慣例に従い、αリリースは、その直前の安定リリースよりも
 新しく、次の安定リリースよりも小さく判定されます。
-dotted-decimal versions, only the last element may be separated by an
-underscore:
-(TBT)
-
+ドット付き 10 進数バージョンでは、最後の要素のみが下線で分離されます:
 
   # Declaring
   use version 0.77; our $VERSION = version->declare("v1.2_3");
@@ -669,6 +663,8 @@
 
 =head1 OBJECT METHODS
 
+(オブジェクトメソッド)
+
 =head2 is_alpha()
 
 =begin original
@@ -677,8 +673,7 @@
 
 =end original
 
-True if and only if the version object was created with a underscore, e.g.
-(TBT)
+バージョンオブジェクトが下線付きで作られた場合にのみ真になります; 例えば
 
   version->parse('1.002_03')->is_alpha;  # TRUE
   version->declare('1.2.3_4')->is_alpha; # TRUE
@@ -691,8 +686,8 @@
 
 =end original
 
-True only if the version object is a dotted-decimal version, e.g.
-(TBT)
+バージョンオブジェクトがドット付き 10 進数バージョンの場合にのみ真になります;
+例えば
 
   version->parse('v1.2.0')->is_qv;        # TRUE
   version->declare('v1.2')->is_qv;       # TRUE
@@ -708,9 +703,8 @@
 
 =end original
 
-Returns a string with a standard 'normalized' dotted-decimal form with a
-leading-v and at least 3 components.
-(TBT)
+先頭の v と最低 3 要素ある標準の「正規化された」ドット付き 10 進数形式の
+文字列を返します。
 
  version->declare('v1.2')->normal;  # v1.2.0
  version->parse('1.2')->normal;     # v1.200.0
@@ -724,9 +718,7 @@
 
 =end original
 
-Returns a value representing the object in a pure decimal form without
-trailing zeroes.
-(TBT)
+末尾のゼロなしの純粋な 10 進数形式のオブジェクトで表現される値を返します。
 
  version->declare('v1.2')->numify;  # 1.002
  version->parse('1.2')->numify;     # 1.2
@@ -742,11 +734,10 @@
 
 =end original
 
-Returns a string that is as close to the original representation as possible.
-If the original representation was a numeric literal, it will be returned the
-way perl would normally represent it in a string.  This method is used whenever
-a version object is interpolated into a string.
-(TBT)
+元の表現にできるだけ近い文字列を返します。
+元の表現が数値リテラルなら、perl が通常これを文字列で表現する方法で値を
+返します。
+このメソッドはバージョンオブジェクトが文字列に変換された時に使われます。
 
  version->declare('v1.2')->stringify;    # v1.2
  version->parse('1.200')->stringify;     # 1.200
@@ -754,6 +745,8 @@
 
 =head1 EXPORTED FUNCTIONS
 
+(エクスポートされる関数)
+
 =head2 qv()
 
 =begin original
@@ -764,10 +757,9 @@
 
 =end original
 
-This function is no longer recommended for use, but is maintained for
-compatibility with existing code.  If you do not want to have it exported
-to your namespace, use this form:
-(TBT)
+この関数はもはや使用を推奨されませんが、既にあるコードの互換性のために
+保守されています。
+名前空間にこれをエクスポートしたくないときは、以下のようにします:
 
   use version 0.77 ();
 
@@ -785,7 +777,7 @@
 
 Translate: Kenji Inoue <kenz****@oct*****> (0.70)
 Update: SHIRAKATA Kentaro <argra****@ub32*****> (0.74-)
-Status: in progress
+Status: completed
 
 =end meta
 



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