Lines Matching refs:attributes

1 package attributes;
30 BEGIN { bootstrap attributes }
96 attributes - get/set subroutine or variable attributes
104 use attributes (); # optional, to get subroutine declarations
105 my @attrlist = attributes::get(\&foo);
107 use attributes 'get'; # import the attributes::get subroutine
119 use attributes __PACKAGE__, \&foo, 'method';
123 use attributes ();
125 attributes::->import(__PACKAGE__, \$x, 'Bent');
126 attributes::->import(__PACKAGE__, \@y, 'Bent');
127 attributes::->import(__PACKAGE__, \%z, 'Bent');
138 There are only a few attributes currently handled by Perl itself (or
140 package-specific attributes are allowed by an extension mechanism.
143 The setting of subroutine attributes happens at compile time.
144 Variable attributes in C<our> declarations are also applied at compile time.
145 However, C<my> variables get their attributes applied at run-time.
147 before those attributes will get applied. For example:
162 The following are the built-in attributes for subroutines:
209 subroutine or variable. It returns a list of attributes, which may be
215 Otherwise, only L<built-in attributes|"Built-in Attributes"> will be returned.
233 for applying package attributes to 'cloned' copies of subroutines used as
240 (or its @ISA inheritance tree). Similarly, when C<attributes::get> is
246 declared or of the reference passed. Because these attributes are
259 variable or subroutine for which package-defined attributes are desired.
260 The expected return value is a list of associated attributes.
266 attributes from the relevant declaration. The two fixed arguments are
268 variable. The expected return value is a list of attributes which were
270 to delegate a call to its base class, and then only examine the attributes
280 Calling C<attributes::get()> from within the scope of a null package
284 attributes. A named subroutine knows to which symbol table entry it belongs
332 as to how they resolve internally into C<use attributes> invocations by
335 attributes.
349 use attributes ();
350 attributes::->import(Canine => \$spot, "Watchful");
361 use attributes ();
362 attributes::->import(Felis => \$cat, "Nervous");
373 use attributes X => \&foo, "locked";
384 use attributes Y => \&Y::x, "locked";
401 use attributes X => \&X::foo, "locked";
406 be trying to mess with the attributes of something in a package that's