diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | config-db/OpenSLX/ConfigDB.pm | 6 | ||||
-rwxr-xr-x | config-db/slxconfig-demuxer | 4 | ||||
-rw-r--r-- | config-db/t/25-attributes.t | 10 |
4 files changed, 11 insertions, 11 deletions
@@ -95,7 +95,7 @@ install: check-upgrade @ # many of the following modules are part of core perl, but we check @ # for them just to be sure... - @for m in Carp Config::General Cwd DBI Digest::MD5 Encode Fcntl \ + @for m in Carp Clone Config::General Cwd DBI Digest::MD5 Encode Fcntl \ File::Basename File::Find File::Glob File::Path FindBin \ Getopt::Long List::Util Pod::Usage POSIX Socket Storable \ Sys::Hostname Term::ReadLine ; do \ diff --git a/config-db/OpenSLX/ConfigDB.pm b/config-db/OpenSLX/ConfigDB.pm index 964206a1..c8ba7484 100644 --- a/config-db/OpenSLX/ConfigDB.pm +++ b/config-db/OpenSLX/ConfigDB.pm @@ -16,7 +16,7 @@ use warnings; our (@ISA, @EXPORT_OK, %EXPORT_TAGS, $VERSION); $VERSION = 1; # API-version -use Storable qw(dclone); +use Clone qw(clone); use Exporter; @ISA = qw(Exporter); @@ -2628,7 +2628,7 @@ sub aggregatedSystemFileInfoFor my $self = shift; my $system = shift; - my $info = dclone($system); + my $info = clone($system); my $export = $self->fetchExportByID($system->{export_id}); if (!defined $export) { @@ -2953,7 +2953,7 @@ sub _cloneAndUnhingeAttrs my (@valRows, @attrValRows); foreach my $inValRow (@$inValRows) { push @attrValRows, $inValRow->{attrs}; - my $valRow = dclone($inValRow); + my $valRow = clone($inValRow); delete $valRow->{attrs}; push @valRows, $valRow; } diff --git a/config-db/slxconfig-demuxer b/config-db/slxconfig-demuxer index a0c64ff9..9cff4360 100755 --- a/config-db/slxconfig-demuxer +++ b/config-db/slxconfig-demuxer @@ -29,6 +29,7 @@ slxconfig-demuxer Please use the --man option in order to read the full manual. ]; +use Clone qw(clone); use Config::General; use Digest::MD5 qw(md5_hex); use Fcntl qw(:DEFAULT :flock); @@ -38,7 +39,6 @@ use File::Path; use List::Util qw(first); use Getopt::Long qw(:config pass_through); use Pod::Usage; -use Storable qw(dclone); # add the lib-folder and the folder this script lives in to perl's search # path for modules: @@ -522,7 +522,7 @@ sub makeInitRamFS my $vendorOS = $info->{'vendor-os'}; my $kernelFile = basename(followLink($info->{'kernel-file'})); - my $attrs = dclone($info->{attrs} || {}); + my $attrs = clone($info->{attrs} || {}); my $params = { 'attrs' => $attrs, diff --git a/config-db/t/25-attributes.t b/config-db/t/25-attributes.t index 32c1b0fb..9662684c 100644 --- a/config-db/t/25-attributes.t +++ b/config-db/t/25-attributes.t @@ -5,7 +5,7 @@ use warnings; use lib '/opt/openslx/lib'; -use Storable qw(dclone); +use Clone qw(clone); # basic init use OpenSLX::ConfigDB qw(:support); @@ -478,7 +478,7 @@ foreach my $key (sort keys %$shouldBeAttrs1) { } # finally we merge systems into clients and check the outcome of that -my $fullMerge11 = dclone($mergedClient1); +my $fullMerge11 = clone($mergedClient1); ok( mergeAttributes($fullMerge11, $mergedSystem1), 'merging system 1 into client 1' @@ -527,7 +527,7 @@ foreach my $key (sort keys %$shouldBeAttrs11) { ); } -my $fullMerge31 = dclone($mergedClient3); +my $fullMerge31 = clone($mergedClient3); ok( mergeAttributes($fullMerge31, $mergedSystem1), 'merging system 1 into client 3' @@ -576,7 +576,7 @@ foreach my $key (sort keys %$shouldBeAttrs31) { ); } -my $fullMerge13 = dclone($mergedClient1); +my $fullMerge13 = clone($mergedClient1); ok( mergeAttributes($fullMerge13, $mergedSystem3), 'merging system 3 into client 1' @@ -625,7 +625,7 @@ foreach my $key (sort keys %$shouldBeAttrs13) { ); } -my $fullMerge33 = dclone($mergedClient3); +my $fullMerge33 = clone($mergedClient3); ok( mergeAttributes($fullMerge33, $mergedSystem3), 'merging system 3 into client 3' |