Array-AsHash

 view release on metacpan or  search on metacpan

lib/Array/AsHash.pm  view on Meta::CPAN

75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
    }
};
 
sub new {
    my $class = shift;
    return $class->_initialize(@_);
}
 
sub _initialize {
    my ( $class, $arg_ref ) = @_;
    my $self = bless {} => $class;
    $self->{array_for} = [];
    return $self unless $arg_ref;
    my $array = $arg_ref->{array} || [];
    $self->{is_strict} = $arg_ref->{strict};
    $array = Clone::clone($array) if $arg_ref->{clone};
 
    unless ( 'ARRAY' eq ref $array ) {
        $class->$_croak('Argument to new() must be an array reference');
    }
    if ( @$array % 2 ) {



( run in 0.282 second using v1.01-cache-2.11-cpan-e5176c747c2 )