diff options
author | knarf <knarf@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2009-09-11 16:20:00 +0000 |
---|---|---|
committer | knarf <knarf@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2009-09-11 16:20:00 +0000 |
commit | 3ef4b6d9fb7f53d7e1b15e52b85d051899c601d2 (patch) | |
tree | 5597b154d7bbf08c54c07db3d581abff9b1c7137 /lib/sbin | |
parent | a46b2a6daa2f3f85ae283e6136609de1c31b930e (diff) |
fix pointer vs hash error
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4570 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin')
-rw-r--r-- | lib/sbin/CST | 12 | ||||
-rw-r--r-- | lib/sbin/CSTUtils.pl | 14 |
2 files changed, 13 insertions, 13 deletions
diff --git a/lib/sbin/CST b/lib/sbin/CST index 8aa35b7d..43a19ef7 100644 --- a/lib/sbin/CST +++ b/lib/sbin/CST @@ -6,7 +6,7 @@ # @desc # Parses the the configuration files for thorns. # @enddesc -# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/sbin/CST,v 1.79 2009-09-11 16:07:35 knarf Exp $ +# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/sbin/CST,v 1.80 2009-09-11 16:20:00 knarf Exp $ #@@*/ # Global parameter to track the number of errors from the CST @@ -100,8 +100,8 @@ print "Parsing interface files...\n"; %interface_database = &create_interface_database(scalar(keys %system_database), %system_database, %source_thorns); #$debug_interface = 1; -&print_database("interface", %interface_database) if($debug_interface); -&save_database("interface", %interface_database) if ($debug_interface); +&print_database("interface", \%interface_database) if($debug_interface); +&save_database("interface", \%interface_database) if($debug_interface); # Parse the parameter.ccl files print "Parsing parameter files...\n"; @@ -124,13 +124,13 @@ print "Checking consistency...\n"; $err_msg = &CheckCrossConsistency(\%interface_database,\%parameter_database); #$debug_interface = 1; -&print_database("interface", %interface_database) if($debug_interface); +&print_database("interface", \%interface_database) if($debug_interface); #$debug_parameters=1; -&print_database("parameter", %parameter_database ) if($debug_parameters); +&print_database("parameter", \%parameter_database ) if($debug_parameters); #$debug_schedule = 1; -&print_database("schedule", %schedule_database) if($debug_schedule); +&print_database("schedule", \%schedule_database) if($debug_schedule); # Create all the bindings print "Creating Thorn-Flesh bindings...\n"; diff --git a/lib/sbin/CSTUtils.pl b/lib/sbin/CSTUtils.pl index 1c2fb0e2..91abbc85 100644 --- a/lib/sbin/CSTUtils.pl +++ b/lib/sbin/CSTUtils.pl @@ -848,28 +848,28 @@ sub recurse_deps sub print_database { - my($type, %database) = @_; + my($type, $database) = @_; my($field); print "$type database dump:\n"; - foreach $field ( sort keys %database ) + foreach $field ( sort keys %$database ) { - print "$field has value $database{$field}\n"; + print "$field has value $database->{$field}\n"; } } sub save_database { - my($type, %database) = @_; + my($type, $database) = @_; my($field); if ($type !~ /[a-zA-Z.]+/) { die "first parameter of save_database contains forbidden characters"; } - open SAVE_DATABASE, ">$type_database"; - foreach $field ( sort keys %database ) + open SAVE_DATABASE, ">${type}_database"; + foreach $field ( sort keys %$database ) { - print SAVE_DATABASE "$field has value $database{$field}\n"; + print SAVE_DATABASE "$field has value $database->{$field}\n"; } close SAVE_DATABASE; } |