=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. =end original 属性を宣言してください。 L も参照してください。 =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 on a subroutine reference or name returns its list of attribute names. Notice that C 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 on a subroutine reference or name returns its list of attribute names. Notice that C 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 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 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 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 operator immediately after the subroutine is entered. (TBT) =back =cut