You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by ar...@apache.org on 2009/12/14 17:18:35 UTC

svn commit: r890394 - /incubator/vcl/trunk/managementnode/lib/VCL/Module.pm

Author: arkurth
Date: Mon Dec 14 16:18:35 2009
New Revision: 890394

URL: http://svn.apache.org/viewvc?rev=890394&view=rev
Log:
VCL-279
Updated Module.pm to not attempt to call initialize if running in setup mode. In this mode, vcld attempts to create an object for each module. However, a valid reservation DataStructure object does not exist which can be passed to the module. This causes problems if a module has an initialize subroutine which expects a valid DataStructure object.

Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/Module.pm

Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module.pm?rev=890394&r1=890393&r2=890394&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module.pm Mon Dec 14 16:18:35 2009
@@ -84,7 +84,7 @@
 use diagnostics;
 use English '-no_match_vars';
 
-use VCL::utils qw($VERBOSE %ERRORS &notify &getnewdbh format_data);
+use VCL::utils qw($SETUP_MODE $VERBOSE %ERRORS &notify &getnewdbh format_data);
 use VCL::DataStructure;
 
 ##############################################################################
@@ -153,8 +153,8 @@
 	bless $class_object, $class;
 	notify($ERRORS{'DEBUG'}, 0, "$class object created");
 
-	# Check if an initialize() subroutine is defined for this module
-	if ($class_object->can("initialize")) {
+	# Check if not running in setup mode and if initialize() subroutine is defined for this module
+	if (!$SETUP_MODE && $class_object->can("initialize")) {
 		# Call the initialize() subroutine, if it returns 0, return 0
 		# If it doesn't return 0, return the object reference
 		return if (!$class_object->initialize($args));