[perldocjp-cvs 1337] CVS update: docs/modules/attrs-1.03

Back to archive index

argra****@users***** argra****@users*****
2011年 9月 7日 (水) 05:02:32 JST


Index: docs/modules/attrs-1.03/attrs.pod
diff -u /dev/null docs/modules/attrs-1.03/attrs.pod:1.1
--- /dev/null	Wed Sep  7 05:02:32 2011
+++ docs/modules/attrs-1.03/attrs.pod	Wed Sep  7 05:02:32 2011
@@ -0,0 +1,107 @@
+
+=encoding euc-jp
+
+=head1 NAME
+
+=begin original
+
+attrs - set/get attributes of a subroutine (deprecated)
+
+=end original
+
+attrs - サブルーチンの属性を設定/取得する (非推奨)
+
+=head1 SYNOPSIS
+
+    sub foo {
+        use attrs qw(locked method);
+        ...
+    }
+
+    @a = attrs::get(\&foo);
+
+=head1 DESCRIPTION
+
+=begin original
+
+NOTE: Use of this pragma is deprecated.  Use the syntax
+
+=end original
+
+注意: このプラグマの使用は非推奨です。
+以下の文法を使って
+
+    sub foo : locked method { }
+
+=begin original
+
+to declare attributes instead.  See also L<attributes>.
+
+=end original
+
+属性を宣言してください。
+L<attributes> も参照してください。
+
+=begin original
+
+This pragma lets you set and get attributes for subroutines.
+Setting attributes takes place at compile time; trying to set
+invalid attribute names causes a compile-time error. Calling
+C<attrs::get> on a subroutine reference or name returns its list
+of attribute names. Notice that C<attrs::get> is not exported.
+Valid attributes are as follows.
+
+=end original
+
+This pragma lets you set and get attributes for subroutines.
+Setting attributes takes place at compile time; trying to set
+invalid attribute names causes a compile-time error. Calling
+C<attrs::get> on a subroutine reference or name returns its list
+of attribute names. Notice that C<attrs::get> is not exported.
+Valid attributes are as follows.
+(TBT)
+
+=over 4
+
+=item method
+
+=begin original
+
+Indicates that the invoking subroutine is a method.
+
+=end original
+
+Indicates that the invoking subroutine is a method.
+(TBT)
+
+=item locked
+
+=begin original
+
+Setting this attribute is only meaningful when the subroutine or
+method is to be called by multiple threads. When set on a method
+subroutine (i.e. one marked with the B<method> attribute above),
+perl ensures that any invocation of it implicitly locks its first
+argument before execution. When set on a non-method subroutine,
+perl ensures that a lock is taken on the subroutine itself before
+execution. The semantics of the lock are exactly those of one
+explicitly taken with the C<lock> operator immediately after the
+subroutine is entered.
+
+=end original
+
+Setting this attribute is only meaningful when the subroutine or
+method is to be called by multiple threads. When set on a method
+subroutine (i.e. one marked with the B<method> attribute above),
+perl ensures that any invocation of it implicitly locks its first
+argument before execution. When set on a non-method subroutine,
+perl ensures that a lock is taken on the subroutine itself before
+execution. The semantics of the lock are exactly those of one
+explicitly taken with the C<lock> operator immediately after the
+subroutine is entered.
+(TBT)
+
+=back
+
+=cut
+



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