in reply to Re^2: BackupPC or Data::Dumper playing foul...?
in thread BackupPC or Data::Dumper playing foul...?
Well this all depends on how the output from Dump (or Dumper) is going to be used, which you don't show; but yes, if the intent is to eval() the output to store in a scalar, passing [*value] is exactly the wrong thing to do.
Even if \[*value] works for you now, it is an invalid parameter for Data::Dumper, so it's likely that another future version will actually check that and complain about it. The correct fix, as I mentioned in my original reply, is to remove the second parameter to new() altogether: just make it Data::Dumper->new([$newConf->{$var}]).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: BackupPC or Data::Dumper playing foul...?
by Krambambuli (Curate) on Apr 08, 2022 at 21:55 UTC | |
by dsheroh (Monsignor) on Apr 11, 2022 at 07:20 UTC |
In Section
Seekers of Perl Wisdom