The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Util::Medley::Hash - utility methods for working with hashes

VERSION

version 0.061

SYNOPSIS

  $bool = $util->isHash(\%h);
  $bool = $util->isHash(ref => \%h);
 

METHODS

isHash

Checks if the scalar value passed in is a hash.

usage:
  $bool = $util->isHash(\%h);

  $bool = $util->isHash(ref => \%h);
   
args:
ref [Any]

The scalar value you wish to check.

merge

Merge two hashrefs. Pass-through to Hash::Merge.

usage:
  $href = $util->merge(\%left, \%right, [$precedent]);

  $href = $util->merge(left       => \%left,
                       right      => \%right,
                       [precedent => $precedent]);
   
args:
left [HashRef]

The left hashref.

right [HashRef]

The right hashref.

precedent [Str] (optional)

Inidcates which hashref should take precendence over the other.

Valid values: LEFT, RIGHT

Default: LEFT