NAME

Array::Merge - merge two arrays, optionally with help of the base one


SYNOPSIS

See merge_arrays function.


DESCRIPTION

At times a list of values may evolve independently in two branches, then the need to merge two alternatives arises. This module helps.


FUNCTIONS

merge_arrays

usage
  $result_arr = merge_arrays($local_arr, $remote_arr, $base_arr);
description
This function merges 2 lists (local and remote), optionally using an additional base list, and returns the result of this merge.

The optional argument may be either array ref or string 'local' or string 'remote', in which case the base array is considered to be either the first or the second array.

parameters
  * local list (array ref)
  * remote list (array ref)
  * optional base/original list (array ref)
returns
Resulting list (array ref).