method readonly
1 | class Attribute |
1.1 | (Attribute) method readonly |
2 | class Parameter |
2.1 | (Parameter) method readonly |
Documentation for method readonly
assembled from the following types:
class Attribute
From Attribute
(Attribute) method readonly
Defined as:
method readonly(Attribute: --> Bool)
Returns True
for readonly attributes, which is the default, or False
for attributes marked as is rw
.
my = Library.^attributes(:local)[0];my = Library.^attributes(:local)[1];say .readonly; # OUTPUT: «True»say .readonly; # OUTPUT: «False»
class Parameter
From Parameter
(Parameter) method readonly
Defined as:
method readonly(Parameter: --> Bool)
Returns True
for read-only parameters (the default).
my Signature = :(Str is rw, Bool :);say .params[0].readonly; # OUTPUT: «False»say .params[1].readonly; # OUTPUT: «True»