in reply to Re: BackupPC or Data::Dumper playing foul...?
in thread BackupPC or Data::Dumper playing foul...?
The output that matters is#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my $newConf = { 'FullKeepCnt' => [ 4 ] }; print "Original structure: ", Dumper( $newConf ); foreach my $var ( sort(keys(%$newConf)) ) { my $d1 = Data::Dumper->new([$newConf->{$var}], \[*value]); print "\nd1: ", Dumper( $d1 ); my $value1 = $d1->Dump; print "\nvalue 1: $value1\n"; my $d2 = Data::Dumper->new([$newConf->{$var}], [*value]); $d2->Useperl(0); print "\nd2: ", Dumper( $d2 ); my $value2 = $d2->Dump; print "\nvalue2: $value2\n"; }
whereas the initial arrayref is what BackupPC needs and expects. (The list it gets back now via DumpXS actually ruins BackupPCs config files when using the web interface for editing...)value2: @main::value = ( 4 );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: BackupPC or Data::Dumper playing foul...?
by hv (Prior) on Apr 08, 2022 at 20:41 UTC | |
by Krambambuli (Curate) on Apr 08, 2022 at 21:55 UTC | |
by dsheroh (Monsignor) on Apr 11, 2022 at 07:20 UTC |