XTaTIK/Utilities/Misc.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 12 / 12 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« XTaTIK/Plugin/Cart/Base.pm ↑ Summary
1 package XTaTIK::Utilities::Misc;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 our $VERSION = '0.001002'; # VERSION
7  
8 2 ▶use experimental 'autoderef';
Subroutine BEGIN: called CC=1 SCAR=0.0
9 use Exporter::Easy OK => [qw/merge_conf/];
10  
11 sub merge_conf {
12 my ( $main_conf, $site_conf ) = @_;
13 my $conf = { %$main_conf, %$site_conf };
14  
15 if ( $site_conf->{text} ) {
16 $conf->{text}{$_} = exists $site_conf->{text}{$_}
17 ? $site_conf->{text}{$_} : $main_conf->{text}{$_}
18 for keys $site_conf->{text}, keys $main_conf->{text};
19 }
20  
21 return %$conf;
22 }
23  
24 1;
« XTaTIK/Plugin/Cart/Base.pm ↑ Summary