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.028002'; |
3
|
98
|
|
|
98
|
|
1116
|
use strictures 2; |
|
98
|
|
|
|
|
501
|
|
|
98
|
|
|
|
|
3287
|
|
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
|
|
15134
|
use Exporter (); |
|
98
|
|
|
|
|
121
|
|
|
98
|
|
|
|
|
4058
|
|
16
|
|
|
|
|
|
|
our @EXPORT = 'immarray_of'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub import { |
19
|
98
|
|
|
98
|
|
181
|
my $pkg = caller; |
20
|
98
|
|
|
98
|
|
503
|
{ no strict 'refs'; |
|
98
|
|
|
|
|
109
|
|
|
98
|
|
|
|
|
10990
|
|
|
98
|
|
|
|
|
117
|
|
21
|
98
|
|
|
|
|
215
|
${"${pkg}::a"} = ${"${pkg}::a"}; |
|
98
|
|
|
|
|
238
|
|
|
98
|
|
|
|
|
308
|
|
22
|
98
|
|
|
|
|
178
|
${"${pkg}::b"} = ${"${pkg}::b"}; |
|
98
|
|
|
|
|
170
|
|
|
98
|
|
|
|
|
233
|
|
23
|
|
|
|
|
|
|
} |
24
|
98
|
|
|
|
|
5528
|
goto &Exporter::import |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
2
|
|
|
2
|
0
|
341
|
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 |