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
| System | Port | Version |
|---|---|---|
| FreeBSD | devel/p5-Data-ModeMerge | 0.360 |
| DragonFly | devel/p5-Data-ModeMerge | 0.36.0 |
| HardenedBSD | devel/p5-Data-ModeMerge | 0.360 |
| GhostBSD | devel/p5-Data-ModeMerge | 0.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.
| Repository | aarch64 | amd64 | armv6 | armv7 | i386 |
|---|---|---|---|---|---|
| FreeBSD:14:latest | 0.360 | 0.360 | - | 0.36.0 | 0.360 |
| FreeBSD:14:quarterly | 0.360 | 0.360 | n/a | 0.36.0 | 0.360 |
| FreeBSD:15:latest | 0.360 | 0.360 | n/a | 0.36.0 | 0.36.0 |
| FreeBSD:15:quarterly | 0.360 | 0.360 | n/a | n/a | n/a |
| FreeBSD:16:latest | 0.360 | 0.360 | n/a | n/a | n/a |
| FreeBSD:16:quarterly | n/a | n/a | n/a | n/a | n/a |
Dependencies
As this port's Makefile names them.
Build 2
p5-Data-Dmp>=0.241: devel/p5-Data-Dmpp5-Mo>=0: devel/p5-Mo
Runtime 2
p5-Data-Dmp>=0.241: devel/p5-Data-Dmpp5-Mo>=0: devel/p5-Mo
Test 1
p5-Test-Exception>=0: devel/p5-Test-Exception
The full lists below include those, and their dependencies in turn.
Build dependencies 4
Run dependencies 4
Required by 2
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
| File | Size | SHA256 |
|---|---|---|
| Data-ModeMerge-0.360.tar.gz | 47971 | 1bac4f668a13be28b7b835f84b3543e5b73d963b6fb38b71c735d9079fbe7454 |
Master sites 1
- CPAN
Commit history 0
No commits in the history this site was built from.