[perldocjp-cvs 1343] CVS update: docs/modules/base-2.14

Back to archive index

argra****@users***** argra****@users*****
2011年 9月 9日 (金) 04:45:54 JST


Index: docs/modules/base-2.14/base.pod
diff -u /dev/null docs/modules/base-2.14/base.pod:1.1
--- /dev/null	Fri Sep  9 04:45:54 2011
+++ docs/modules/base-2.14/base.pod	Fri Sep  9 04:45:54 2011
@@ -0,0 +1,171 @@
+
+=encoding euc-jp
+
+=head1 NAME
+
+=begin original
+
+base - Establish an ISA relationship with base classes at compile time
+
+=end original
+
+base - コンパイル時に基底クラスとの ISA 関係を構築する
+
+=head1 SYNOPSIS
+
+    package Baz;
+    use base qw(Foo Bar);
+
+=head1 DESCRIPTION
+
+=begin original
+
+Unless you are using the C<fields> pragma, consider this module discouraged
+in favor of the lighter-weight C<parent>.
+
+=end original
+
+Unless you are using the C<fields> pragma, consider this module discouraged
+in favor of the lighter-weight C<parent>.
+(TBT)
+
+=begin original
+
+Allows you to both load one or more modules, while setting up inheritance from
+those modules at the same time.  Roughly similar in effect to
+
+=end original
+
+Allows you to both load one or more modules, while setting up inheritance from
+those modules at the same time.  Roughly similar in effect to
+(TBT)
+
+    package Baz;
+    BEGIN {
+        require Foo;
+        require Bar;
+        push @ISA, qw(Foo Bar);
+    }
+
+=begin original
+
+C<base> employs some heuristics to determine if a module has already been
+loaded, if it has it doesn't try again. If C<base> tries to C<require> the
+module it will not die if it cannot find the module's file, but will die on any
+other error. After all this, should your base class be empty, containing no
+symbols, it will die. This is useful for inheriting from classes in the same
+file as yourself, like so:
+
+=end original
+
+C<base> employs some heuristics to determine if a module has already been
+loaded, if it has it doesn't try again. If C<base> tries to C<require> the
+module it will not die if it cannot find the module's file, but will die on any
+other error. After all this, should your base class be empty, containing no
+symbols, it will die. This is useful for inheriting from classes in the same
+file as yourself, like so:
+(TBT)
+
+        package Foo;
+        sub exclaim { "I can have such a thing?!" }
+        
+        package Bar;
+        use base "Foo";
+
+=begin original
+
+If $VERSION is not detected even after loading it, <base> will define $VERSION
+in the base package, setting it to the string C<-1, set by base.pm>.
+
+=end original
+
+If $VERSION is not detected even after loading it, <base> will define $VERSION
+in the base package, setting it to the string C<-1, set by base.pm>.
+(TBT)
+
+=begin original
+
+C<base> will also initialize the fields if one of the base classes has it.
+Multiple inheritance of fields is B<NOT> supported, if two or more base classes
+each have inheritable fields the 'base' pragma will croak. See L<fields>,
+L<public> and L<protected> for a description of this feature.
+
+=end original
+
+C<base> will also initialize the fields if one of the base classes has it.
+Multiple inheritance of fields is B<NOT> supported, if two or more base classes
+each have inheritable fields the 'base' pragma will croak. See L<fields>,
+L<public> and L<protected> for a description of this feature.
+(TBT)
+
+=begin original
+
+The base class' C<import> method is B<not> called.
+
+=end original
+
+基底クラスの C<import> メソッドは B<呼び出されません>。
+
+=head1 DIAGNOSTICS
+
+(診断メッセージ)
+
+=over 4
+
+=item Base class package "%s" is empty.
+
+=begin original
+
+base.pm was unable to require the base package, because it was not
+found in your path.
+
+=end original
+
+base.pm was unable to require the base package, because it was not
+found in your path.
+(TBT)
+
+=item Class 'Foo' tried to inherit from itself
+
+=begin original
+
+Attempting to inherit from yourself generates a warning.
+
+=end original
+
+自分自身を継承しようとすると警告が出ます。
+
+    use Foo;
+    use base 'Foo';
+
+=back
+
+=head1 HISTORY
+
+=begin original
+
+This module was introduced with Perl 5.004_04.
+
+=end original
+
+このモジュールは Perl 5.004_04 で導入されました。
+
+=head1 CAVEATS
+
+(注意)
+
+=begin original
+
+Due to the limitations of the implementation, you must use
+base I<before> you declare any of your own fields.
+
+=end original
+
+実装上の制限により、独自のフィールドを宣言する I<前に>use base しなければなりません。
+
+=head1 SEE ALSO
+
+L<fields>
+
+=cut
+



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