[perldocjp-cvs 1781] CVS update: docs/perl/5.8.0

Back to archive index

ktats****@users***** ktats****@users*****
2013年 5月 4日 (土) 16:59:20 JST


Index: docs/perl/5.8.0/AutoLoader.pod
diff -u docs/perl/5.8.0/AutoLoader.pod:1.2 docs/perl/5.8.0/AutoLoader.pod:1.3
--- docs/perl/5.8.0/AutoLoader.pod:1.2	Wed Jan 26 15:11:28 2011
+++ docs/perl/5.8.0/AutoLoader.pod	Sat May  4 16:59:18 2013
@@ -20,23 +20,33 @@
 
 =head1 説明
 
+=begin original
+
 The B<AutoLoader> module works with the B<AutoSplit> module and the
 C<__END__> token to defer the loading of some subroutines until they are
 used rather than loading them all at once.
 
+=end original
+
 B<AutoLoader>モジュールは、B<AutoSplit>モジュールとC<__END__>トークン
 と一緒に働き、サブルーチンすべてを一度に読み込むのではなくて、
 使われるまで、サブルーチンの読み込みを延期します。
 
+=begin original
+
 To use B<AutoLoader>, the author of a module has to place the
 definitions of subroutines to be autoloaded after an C<__END__> token.
 (See L<perldata>.)  The B<AutoSplit> module can then be run manually to
 extract the definitions into individual files F<auto/funcname.al>.
 
+=end original
+
 B<AutoLoader>を使うために、モジュールの作者は、
 自動的に読み込むブルーチンの定義をC<__END__>トークン(L<perldata>を見てください)の後に置く必要があります。
 B<AutoSplit>モジュールを走らせると、手動で定義を、個々のF<auto/funcname.al>ファイル抜きだします。
 
+=begin original
+
 B<AutoLoader> implements an AUTOLOAD subroutine.  When an undefined
 subroutine in is called in a client module of B<AutoLoader>,
 B<AutoLoader>'s AUTOLOAD subroutine attempts to locate the subroutine in a
@@ -49,6 +59,8 @@
 thus (presumably) defining the needed subroutine.  AUTOLOAD will then
 C<goto> the newly defined subroutine.
 
+=end original
+
 B<AutoLoader>は、AUTOLOADサブルーチンを実装します。
 未定義のサブルーチンが、B<AutoLoader>のクライアントモジュールで、呼び出されると、
 B<AutoLoader>のAUTOLOADサブルーチンは、
@@ -61,20 +73,28 @@
 このようにして、(たぶん、)必要とされるサブルーチンを定義します。
 それから、AUTOLOADは新たに定義されたサブルーチンへC<goto>します。
 
+=begin original
+
 Once this process completes for a given function, it is defined, so
 future calls to the subroutine will bypass the AUTOLOAD mechanism.
 
+=end original
+
 与えられた関数のために、一度このプロセスが実行され関数が定義されると、
 (訳註:次回以降の)未来のサブルーチンの呼び出しは、AUTOLOADのメカニズムを無視します。
 
 =head2 Subroutine Stubs
 
+=begin original
+
 In order for object method lookup and/or prototype checking to operate
 correctly even when methods have not yet been defined it is necessary to
 "forward declare" each subroutine (as in C<sub NAME;>).  See
 L<perlsub/"SYNOPSIS">.  Such forward declaration creates "subroutine
 stubs", which are place holders with no code.
 
+=end original
+
 メソッドがまだ定義されていないときにでも、
 オブジェクトメソッドの調査および/または、プロトタイプチェックを、
 正確に行うために、それぞれのサブルーチンを(C<sub NAME;>のように)、
@@ -82,29 +102,41 @@
 このような前宣言は、"subroutine stubs"を作ります。
 これは、コード無しのプレースホルダです。
 
+=begin original
+
 The AutoSplit and B<AutoLoader> modules automate the creation of forward
 declarations.  The AutoSplit module creates an 'index' file containing
 forward declarations of all the AutoSplit subroutines.  When the
 AutoLoader module is 'use'd it loads these declarations into its callers
 package.
 
+=end original
+
 AutoSplit と、B<AutoLoader>モジュールは前宣言の作成を自動化します。
 AutoSplit モジュールは、'index'ファイルを作り、そこに、
 AutoSplitが分割した、すべてのサブルーチンの前宣言を置きます。
 AutoLoaderモジュールが、'use'されると、その呼び出しパッケージに、
 それらの定義を読み込みます。 
 
+=begin original
+
 Because of this mechanism it is important that B<AutoLoader> is always
 C<use>d and not C<require>d.
 
+=end original
+
 このメカニズムのために、B<AutoLoader>が、つねに、C<use>され、
 C<require>されないということが重要です。
 
 =head2 B<AutoLoader> の AUTOLOAD サブルーチンを使う
 
+=begin original
+
 In order to use B<AutoLoader>'s AUTOLOAD subroutine you I<must>
 explicitly import it:
 
+=end original
+
 B<AutoLoader>のAUTOLOADサブルーチンために、
 明示的にそれをインポートI<しなければなりません>。
 
@@ -112,18 +144,26 @@
 
 =head2 B<AutoLoader>'s AUTOLOAD サブルーチンをオーバーロードする
 
+=begin original
+
 Some modules, mainly extensions, provide their own AUTOLOAD subroutines.
 They typically need to check for some special cases (such as constants)
 and then fallback to B<AutoLoader>'s AUTOLOAD for the rest.
 
+=end original
+
 いくつかのモジュールには、主な拡張として、自分自身のAUTOLOADサブルーチンをもっています。
 それらは、典型的に、いくつかの特別なケース(定数のような)のために、チェックする必要があり、
 そして、それから、残りのために、B<AutoLoader>のAUTOLOADにフォールバックする必要があります。
 
+=begin original
+
 Such modules should I<not> import B<AutoLoader>'s AUTOLOAD subroutine.
 Instead, they should define their own AUTOLOAD subroutines along these
 lines:
 
+=end original
+
 このようなモジュールはB<AutoLoader>のAUTOLOADサブルーチンをインポートすべきではI<ありません>。
 そのかわりに、そういうモジュールは、自分自身のAUTOLOADサブルーチンを定義すべきです。
 次のようにします:
@@ -148,10 +188,14 @@
         goto &$sub;
     }
 
+=begin original
+
 If any module's own AUTOLOAD subroutine has no need to fallback to the
 AutoLoader's AUTOLOAD subroutine (because it doesn't have any AutoSplit
 subroutines), then that module should not use B<AutoLoader> at all.
 
+=end original
+
 (AutoSplitするサブルーチンを全くもっていないために)、モジュールのAUTOLOADサブルーチンが、
 AutoLoaderのAUTOLOADサブルーチンにフォールバックする必要がなければ、
 そのモジュールはB<AutoLoader>を、全く使わないべきです。
@@ -170,12 +214,16 @@
 そのような変数をパッケージのグローバル変数のように使っているモジュールは、
 B<AutoLoader>のもとでは、うまく動きません。
 
+=begin original
+
 The C<vars> pragma (see L<perlmod/"vars">) may be used in such
 situations as an alternative to explicitly qualifying all globals with
 the package namespace.  Variables pre-declared with this pragma will be
 visible to any autoloaded routines (but will not be invisible outside
 the package, unfortunately).
 
+=end original
+
 C<vars>プラグマ(L<perlmod/"vars">を見てください)が、こういった状況で、
 パッケージの名前空間で明示的に完全修飾したグローバル変数に変わるものとして、使われるでしょう。
 このプラグマで先に宣言された変数は、どんな、自動的に読み込まれるルーチンにも見えます。
@@ -183,20 +231,30 @@
 
 =head2 AutoLoaderを使わない
 
+=begin original
+
 You can stop using AutoLoader by simply
 
+=end original
+
 AutoLoaderを使わなくするには、単純に次のようにします。
 
 	no AutoLoader;
 
 =head2 B<AutoLoader> vs. B<SelfLoader>
 
+=begin original
+
 The B<AutoLoader> is similar in purpose to B<SelfLoader>: both delay the
 loading of subroutines.
 
+=end original
+
 B<AutoLoader>は、B<SelfLoader>の目的と類似性があります:
 両方ともサブルーチンの読み込みを遅らせるものです。
 
+=begin original
+
 B<SelfLoader> uses the C<__DATA__> marker rather than C<__END__>.
 While this avoids the use of a hierarchy of disk files and the
 associated open/close for each routine loaded, B<SelfLoader> suffers a
@@ -204,6 +262,8 @@
 C<__DATA__>, after which routines are cached.  B<SelfLoader> can also
 handle multiple packages in a file.
 
+=end original
+
 B<SelfLoader> は、C<__END__>ではなくて、C<__DATA__> マーカーを使います。
 このことにより、それぞれのルーチンを読み込むために、
 ディスクファイルの階層と関連する open/close を使うのを避ける一方で、
@@ -211,12 +271,16 @@
 一時的に解析するので、スタートアップのスピードのディスアドバンテージに耐えなければなりません。
 B<SelfLoader>は、一つのファイルに複数のパッケージを取り扱えます。
 
+=begin original
+
 B<AutoLoader> only reads code as it is requested, and in many cases
 should be faster, but requires a mechanism like B<AutoSplit> be used to
 create the individual files.  L<ExtUtils::MakeMaker> will invoke
 B<AutoSplit> automatically if B<AutoLoader> is used in a module source
 file.
 
+=end original
+
 B<AutoLoader>は、それがリクエストされた時に、コードを読むだけです。
 多くのケースで、これは、速いです。ですが、独立したファイルを作成するのに、
 使われるB<AutoSplit>のようなメカニズムを必要とします。
@@ -225,33 +289,45 @@
 
 =head1 警告
 
+=begin original
+
 AutoLoaders prior to Perl 5.002 had a slightly different interface.  Any
 old modules which use B<AutoLoader> should be changed to the new calling
 style.  Typically this just means changing a require to a use, adding
 the explicit C<'AUTOLOAD'> import if needed, and removing B<AutoLoader>
 from C<@ISA>.
 
+=end original
+
 Perl 5.002 より前のAutoLoaderは、ちょっと違ったインターフェースでした。
 B<AutoLoader>を使っている古いモジュールは、どんなものでも、
 新しいスタイルの呼び出しに変更するべきです。一般に、このことは、次のことを意味します。
 require を use  に変えること、必要なら明示的なC<'AUTOLOAD'>のインポートを加えること、
 @ISAから、B<AutoLoader>を削除することです。
 
+=begin original
+
 On systems with restrictions on file name length, the file corresponding
 to a subroutine may have a shorter name that the routine itself.  This
 can lead to conflicting file names.  The I<AutoSplit> package warns of
 these potential conflicts when used to split a module.
 
+=end original
+
 システムに、ファイル名の長さに関する制限があると、
 ファイルとサブルーチンの一致のために、ルーチン自身がより短い名前になるかもしれません。
 このことは、ファイル名の衝突を引き起こすかも知れません。
 I<AutoSplit>パッケージは、モジュールを分割するときに、
 こういった潜在的な衝突を警告します。
 
+=begin original
+
 AutoLoader may fail to find the autosplit files (or even find the wrong
 ones) in cases where C<@INC> contains relative paths, B<and> the program
 does C<chdir>.
 
+=end original
+
 C<@INC>の中に相対パスがあるときに、プログラムがC<chdir>した場合、
 AutoLoader は、自動的に分割されたファイルを見付けるのに失敗するかも知れません
 (または、間違ったファイルを見つけるかも知れません)。



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