line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package List::Objects::WithUtils::Array::Immutable::Typed; |
2
|
|
|
|
|
|
|
$List::Objects::WithUtils::Array::Immutable::Typed::VERSION = '2.028003'; |
3
|
98
|
|
|
98
|
|
1106
|
use strictures 2; |
|
98
|
|
|
|
|
426
|
|
|
98
|
|
|
|
|
3133
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
require Role::Tiny; |
6
|
|
|
|
|
|
|
Role::Tiny->apply_roles_to_package( __PACKAGE__, |
7
|
|
|
|
|
|
|
qw/ |
8
|
|
|
|
|
|
|
List::Objects::WithUtils::Role::Array |
9
|
|
|
|
|
|
|
List::Objects::WithUtils::Role::Array::WithJunctions |
10
|
|
|
|
|
|
|
List::Objects::WithUtils::Role::Array::Typed |
11
|
|
|
|
|
|
|
List::Objects::WithUtils::Role::Array::Immutable |
12
|
|
|
|
|
|
|
/, |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
98
|
|
|
98
|
|
14693
|
use Exporter (); |
|
98
|
|
|
|
|
124
|
|
|
98
|
|
|
|
|
4047
|
|
16
|
|
|
|
|
|
|
our @EXPORT = 'immarray_of'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub import { |
19
|
98
|
|
|
98
|
|
187
|
my $pkg = caller; |
20
|
98
|
|
|
98
|
|
768
|
{ no strict 'refs'; |
|
98
|
|
|
|
|
116
|
|
|
98
|
|
|
|
|
10549
|
|
|
98
|
|
|
|
|
100
|
|
21
|
98
|
|
|
|
|
169
|
${"${pkg}::a"} = ${"${pkg}::a"}; |
|
98
|
|
|
|
|
165
|
|
|
98
|
|
|
|
|
307
|
|
22
|
98
|
|
|
|
|
144
|
${"${pkg}::b"} = ${"${pkg}::b"}; |
|
98
|
|
|
|
|
148
|
|
|
98
|
|
|
|
|
166
|
|
23
|
|
|
|
|
|
|
} |
24
|
98
|
|
|
|
|
5223
|
goto &Exporter::import |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
2
|
|
|
2
|
0
|
406
|
sub immarray_of { __PACKAGE__->new(@_) } |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=pod |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=for Pod::Coverage immarray_of |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 NAME |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
List::Objects::WithUtils::Array::Immutable::Typed - Immutable typed arrays |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 SYNOPSIS |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
use List::Objects::WithUtils 'immarray_of'; |
42
|
|
|
|
|
|
|
use Types::Standard -types; |
43
|
|
|
|
|
|
|
my $array = immarray_of( Int() => 1, 2, 3 ); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 DESCRIPTION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
These are immutable type-checking array objects, essentially a combination of |
48
|
|
|
|
|
|
|
L and |
49
|
|
|
|
|
|
|
L. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Type-checking is performed when the object is created; attempts to modify the |
52
|
|
|
|
|
|
|
object will throw an exception. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
This class consumes the following roles, which contain most of the relevant |
55
|
|
|
|
|
|
|
documentation: |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
L |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
L |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
L |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
L |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 AUTHOR |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Jon Portnoy |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=cut |