File Coverage

lib/List/Objects/WithUtils/Array/Immutable/Typed.pm
Criterion Covered Total %
statement 7 7 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
total 10 10 100.0


line stmt bran cond sub code
1         package List::Objects::WithUtils::Array::Immutable::Typed;
2 14     14 use strictures 1;
  14        
  14        
3          
4         require Role::Tiny;
5         Role::Tiny->apply_roles_to_package( __PACKAGE__,
6           qw/
7         List::Objects::WithUtils::Role::Array
8         List::Objects::WithUtils::Role::Array::WithJunctions
9         List::Objects::WithUtils::Role::Array::Typed
10         List::Objects::WithUtils::Role::Array::Immutable
11         /,
12         );
13          
14 14     14 use Exporter 'import';
  14        
  14        
15         our @EXPORT = 'immarray_of';
16 2     2 sub immarray_of { __PACKAGE__->new(@_) }
17          
18         1;
19          
20         =pod
21        
22         =for Pod::Coverage immarray_of
23        
24         =head1 NAME
25        
26         List::Objects::WithUtils::Array::Immutable::Typed - Immutable typed arrays
27        
28         =head1 SYNOPSIS
29        
30         use List::Objects::WithUtils 'immarray_of';
31         use Types::Standard -types;
32         my $array = immarray_of( Int() => 1, 2, 3 );
33        
34         =head1 DESCRIPTION
35        
36         These are immutable type-checking array objects, essentially a combination of
37         L<List::Objects::WithUtils::Array::Typed> and
38         L<List::Objects::WithUtils::Array::Immutable>.
39        
40         Type-checking is performed when the object is created; attempts to modify the
41         object will throw an exception.
42        
43         This class consumes the following roles, which contain most of the relevant
44         documentation:
45        
46         L<List::Objects::WithUtils::Role::Array>
47        
48         L<List::Objects::WithUtils::Role::Array::WithJunctions>
49        
50         L<List::Objects::WithUtils::Role::Array::Typed>
51        
52         L<List::Objects::WithUtils::Role::Array::Immutable>
53        
54         =head1 AUTHOR
55        
56         Jon Portnoy <avenj@cobaltirc.org>
57        
58         =cut
59