| 1 | package EWS::Contacts::ResultSet; | ||||||||||
| 2 | BEGIN { | ||||||||||
| 3 | 1 | ▶ | $EWS::Contacts::ResultSet::VERSION = '1.143070'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | } | ||||||||||
| 5 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use MooseX::Iterator; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use EWS::Contacts::Item; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 1 | has items => ( | |||||||||
| 11 | is => 'ro', | ||||||||||
| 12 | isa => 'ArrayRef[EWS::Contacts::Item]', | ||||||||||
| 13 | required => 1, | ||||||||||
| 14 | ); | ||||||||||
| 15 | |||||||||||
| 16 | sub BUILDARGS { | ||||||||||
| 17 | 0 | ▶ | my ($class, @rest) = @_; | ||||||||
|
Subroutine
BUILDARGS: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 18 | 0 | ▶ | my $params = (scalar @rest == 1 ? $rest[0] : {@rest}); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | |||||||||||
| 20 | # promote hashes returned from Exchange into Item objects | ||||||||||
| 21 | 0 | $params->{items} = [ map { EWS::Contacts::Item->new($_) } | |||||||||
| 22 | 0 | @{$params->{items}} ]; | |||||||||
| 23 | 0 | return $params; | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | sub count { | ||||||||||
| 27 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
count: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 28 | 0 | return scalar @{$self->items}; | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 1 | has iterator => ( | |||||||||
| 32 | is => 'ro', | ||||||||||
| 33 | isa => 'MooseX::Iterator::Array', | ||||||||||
| 34 | handles => [qw/ | ||||||||||
| 35 | next | ||||||||||
| 36 | has_next | ||||||||||
| 37 | peek | ||||||||||
| 38 | reset | ||||||||||
| 39 | /], | ||||||||||
| 40 | lazy_build => 1, | ||||||||||
| 41 | ); | ||||||||||
| 42 | |||||||||||
| 43 | sub _build_iterator { | ||||||||||
| 44 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
_build_iterator: not called CC=1 SCAR=6.9
| |||||||||||
| 45 | 0 | return MooseX::Iterator::Array->new( collection => $self->items ); | |||||||||
| 46 | } | ||||||||||
| 47 | |||||||||||
| 48 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||
| 49 | 1 | ▶ | no Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 50 | 1 | 1; | |||||||||