| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package MooseX::Iterator::Hash; |
|
2
|
1
|
|
|
1
|
|
6289
|
use Moose; |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
use MooseX::Iterator::Meta::Iterable; |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.11'; |
|
7
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:RLB'; |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
extends 'MooseX::Iterator::Array'; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has '_collection' => ( is => 'rw', isa => 'HashRef | ArrayRef', init_arg => 'collection' ); |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub BUILD { |
|
14
|
|
|
|
|
|
|
my ( $self, $args ) = @_; |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my @pairs = (); |
|
17
|
|
|
|
|
|
|
while ( my ( $key, $value ) = each %{ $args->{'collection'} } ) { |
|
18
|
|
|
|
|
|
|
push @pairs, { key => $key, value => $value }; |
|
19
|
|
|
|
|
|
|
} |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
$self->_collection( \@pairs ); |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
no Moose; |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |