?? attrs.pm
字號:
package attrs;use XSLoader ();$VERSION = "1.0";=head1 NAMEattrs - set/get attributes of a subroutine (deprecated)=head1 SYNOPSIS sub foo { use attrs qw(locked method); ... } @a = attrs::get(\&foo);=head1 DESCRIPTIONNOTE: Use of this pragma is deprecated. Use the syntax sub foo : locked method { }to declare attributes instead. See also L<attributes>.This pragma lets you set and get attributes for subroutines.Setting attributes takes place at compile time; trying to setinvalid attribute names causes a compile-time error. CallingC<attrs::get> on a subroutine reference or name returns its listof attribute names. Notice that C<attrs::get> is not exported.Valid attributes are as follows.=over=item methodIndicates that the invoking subroutine is a method.=item lockedSetting this attribute is only meaningful when the subroutine ormethod is to be called by multiple threads. When set on a methodsubroutine (i.e. one marked with the B<method> attribute above),perl ensures that any invocation of it implicitly locks its firstargument before execution. When set on a non-method subroutine,perl ensures that a lock is taken on the subroutine itself beforeexecution. The semantics of the lock are exactly those of oneexplicitly taken with the C<lock> operator immediately after thesubroutine is entered.=back=cutXSLoader::load 'attrs', $VERSION;1;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -