Array-AsHash

 view release on metacpan or  search on metacpan

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

    }
};

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 ) {

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.989 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )