diff options
author | Tim Retout <tim@retout.co.uk> | 2012-03-14 23:17:19 +0000 |
---|---|---|
committer | Tim Retout <tim@retout.co.uk> | 2012-03-14 23:18:47 +0000 |
commit | 859f601e10f876b2121fbbf6a65d66d017c77d8c (patch) | |
tree | db9fe38abb735e64f46506a1102db9845a4618c2 /solenv | |
parent | 20179059537b3ff345ffe7473408f1182fc24079 (diff) |
Replace installer::files::save_array_of_hashes with Data::Dumper.
Note that this will change the format of the fileinfo log, hopefully
making it a bit more human-readable.
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/bin/make_installer.pl | 7 | ||||
-rw-r--r-- | solenv/bin/modules/installer/files.pm | 28 |
2 files changed, 5 insertions, 30 deletions
diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl index a7d45fdad6f1..1d1b7a78eba6 100644 --- a/solenv/bin/make_installer.pl +++ b/solenv/bin/make_installer.pl @@ -32,6 +32,7 @@ use lib ("$ENV{SOLARENV}/bin/modules"); use Cwd; +use Data::Dumper; use File::Copy; use installer::archivefiles; use installer::control; @@ -1999,8 +2000,10 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ ) } # end of "if ( $installer::globals::iswindowsbuild )" # saving file_info file for later analysis - my $speciallogfilename = "fileinfo_" . $installer::globals::product . "\.log"; - installer::files::save_array_of_hashes($loggingdir . $speciallogfilename, $filesinproductlanguageresolvedarrayref); + my $speciallogfilename = $loggingdir . "fileinfo_" . $installer::globals::product . "\.log"; + open my $log_fh, '>', $speciallogfilename + or die "Could not open $speciallogfilename for writing: $!"; + print $log_fh Dumper($filesinproductlanguageresolvedarrayref); } # end of iteration for one language group diff --git a/solenv/bin/modules/installer/files.pm b/solenv/bin/modules/installer/files.pm index 1d9e7705166f..26715ed919c9 100644 --- a/solenv/bin/modules/installer/files.pm +++ b/solenv/bin/modules/installer/files.pm @@ -95,34 +95,6 @@ sub save_file } } -sub save_array_of_hashes -{ - my ($savefile, $arrayref) = @_; - - my @printcontent = (); - - for ( my $i = 0; $i <= $#{$arrayref}; $i++ ) - { - my $line = ""; - my $hashref = ${$arrayref}[$i]; - my $itemkey; - - foreach $itemkey ( keys %{$hashref} ) - { - my $itemvalue = $hashref->{$itemkey}; - $line = $line . $itemkey . "=" . $itemvalue . "\t"; - } - - $line = $line . "\n"; - - push(@printcontent, $line); - } - - open( OUT, ">$savefile" ) || installer::exiter::exit_program("ERROR: Cannot open file $savefile for writing", "save_array_of_hashes"); - print OUT @printcontent; - close( OUT); -} - ########################################### # Binary file operations ########################################### |