List/Objects/WithUtils/Role/Array/TiedRO.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 17 / 17 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« 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;
« List/Objects/WithUtils/Hash/Typed.pm ↑ Summary List/Objects/WithUtils/Role/Array/WithJunctions.pm »