« List/Objects/WithUtils/Hash/Typed.pm
↑ Summary
List/Objects/WithUtils/Role/Array/WithJunctions.pm »
| 1 | package List::Objects::WithUtils::Role::Array::TiedRO; | ||
| 2 | 1 | $List::Objects::WithUtils::Role::Array::TiedRO::VERSION = '2.028002'; | |
| 3 | =for Pod::Coverage *EVERYTHING* | ||
| 4 | |||
| 5 | =cut | ||
| 6 | |||
| 7 | 1 | ▶ | use strictures 2; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 1 | ▶ | use Carp (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | # This role can be applied to the objects backing tied arrays | ||
| 11 | # after construction time in order to swap a mutable tied array | ||
| 12 | # for an immutable implementation; | ||
| 13 | # Array::Immutable::Typed::immarray_of does this in order to retain | ||
| 14 | # normal tied type array behavior until construction is complete. | ||
| 15 | |||
| 16 | 1 | ▶ | use Role::Tiny; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | |||
| 18 | around $_ => sub { | ||
| 19 | 9 | ▶ | Carp::croak "Attempted to modify a read-only value" |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 20 | 1 | } for qw/ | |
| 21 | STORE | ||
| 22 | STORESIZE | ||
| 23 | CLEAR | ||
| 24 | PUSH | ||
| 25 | POP | ||
| 26 | SHIFT | ||
| 27 | SPLICE | ||
| 28 | UNSHIFT | ||
| 29 | EXTEND | ||
| 30 | /; | ||
| 31 | |||
| 32 | 1 | 1; | |