⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 attrs.pm

📁 UNIX下perl实现代码
💻 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 + -