BSD Ports

devel/p5-Data-ModeMerge 0.360 FreeBSD

Merge two nested data structures, with merging modes and options

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
License
ART10, GPLv1+
Categories
devel, perl5
Package size
44.5 KiB, 134.9 KiB installed

Description

There are already several modules on CPAN to do recursive data structure merging, like Data::Merger and Hash::Merge. Data::ModeMerge differs in that it offers merging "modes" and "options". It provides greater flexibility on what the result of a merge between two data should/can be. This module may or may not be what you need.

One application of this module is in handling configuration. Often there are multiple levels of configuration, e.g. in your typical Unix command-line program there are system-wide config file in /etc, per-user config file under ~/, and command-line options. It's convenient programatically to load each of those in a hash and then merge system-wide hash with the per-user hash, and then merge the result with the command-line hash to get the a single hash as the final configuration. Your program can from there on deal with this just one hash instead of three.

In a typical merging process between two hashes (left-side and right-side), when there is a conflicting key, then the right-side key will override the left-side. This is usually the desired behaviour in our said program as the system-wide config is there to provide defaults, and the per-user config (and the command-line arguments) allow a user to override those defaults.

In the other systems

SystemPortVersion
FreeBSDdevel/p5-Data-ModeMerge0.360
DragonFlydevel/p5-Data-ModeMerge0.36.0
HardenedBSDdevel/p5-Data-ModeMerge0.360
GhostBSDdevel/p5-Data-ModeMerge0.360

Install

Binary package:

pkg install p5-Data-ModeMerge

From the ports tree:

cd /usr/ports/devel/p5-Data-ModeMerge/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	p5-Data-ModeMerge>0:devel/p5-Data-ModeMerge

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest0.3600.360-0.36.00.360
FreeBSD:14:quarterly0.3600.360n/a0.36.00.360
FreeBSD:15:latest0.3600.360n/a0.36.00.36.0
FreeBSD:15:quarterly0.3600.360n/an/an/a
FreeBSD:16:latest0.3600.360n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

As this port's Makefile names them.

Build 2

Runtime 2

Test 1

The full lists below include those, and their dependencies in turn.

Build dependencies 4
Run dependencies 4

Configuration

No options to configure.

USES
perl5
Service scripts
none

Files

pkg-plist 18
  • %%SITE_PERL%%/Data/ModeMerge.pm
  • %%SITE_PERL%%/Data/ModeMerge/Config.pm
  • %%SITE_PERL%%/Data/ModeMerge/Mode/ADD.pm
  • %%SITE_PERL%%/Data/ModeMerge/Mode/Base.pm
  • %%SITE_PERL%%/Data/ModeMerge/Mode/CONCAT.pm
  • %%SITE_PERL%%/Data/ModeMerge/Mode/DELETE.pm
  • %%SITE_PERL%%/Data/ModeMerge/Mode/KEEP.pm
  • %%SITE_PERL%%/Data/ModeMerge/Mode/NORMAL.pm
  • %%SITE_PERL%%/Data/ModeMerge/Mode/SUBTRACT.pm
  • %%PERL5_MAN3%%/Data::ModeMerge.3.gz
  • %%PERL5_MAN3%%/Data::ModeMerge::Config.3.gz
  • %%PERL5_MAN3%%/Data::ModeMerge::Mode::ADD.3.gz
  • %%PERL5_MAN3%%/Data::ModeMerge::Mode::Base.3.gz
  • %%PERL5_MAN3%%/Data::ModeMerge::Mode::CONCAT.3.gz
  • %%PERL5_MAN3%%/Data::ModeMerge::Mode::DELETE.3.gz
  • %%PERL5_MAN3%%/Data::ModeMerge::Mode::KEEP.3.gz
  • %%PERL5_MAN3%%/Data::ModeMerge::Mode::NORMAL.3.gz
  • %%PERL5_MAN3%%/Data::ModeMerge::Mode::SUBTRACT.3.gz
distinfo 1
FileSizeSHA256
Data-ModeMerge-0.360.tar.gz479711bac4f668a13be28b7b835f84b3543e5b73d963b6fb38b71c735d9079fbe7454
Master sites 1
  • CPAN

Commit history 0

No commits in the history this site was built from.