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/06/16 20:22:46 UTC
svn commit: r785334 - /incubator/vcl/trunk/managementnode/lib/VCL/Module.pm
Author: arkurth
Date: Tue Jun 16 18:22:46 2009
New Revision: 785334
URL: http://svn.apache.org/viewvc?rev=785334&view=rev
Log:
VCL-23
Added arguments passed to new() to initialize().
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=785334&r1=785333&r2=785334&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module.pm Tue Jun 16 18:22:46 2009
@@ -115,7 +115,10 @@
initialize() subroutine defined in a child class. This allows
tasks to be automatically performed during object creation.
Implementing an initialize() subroutine is optional.
-
+
+ Any arguments passed to new() will be passed unchanged to
+ initialize().
+
Example:
use VCL::Module::TestModule;
my $test_module = new VCL::Module::TestModule({data_structure => $self->data});
@@ -154,7 +157,7 @@
if ($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());
+ return if (!$class_object->initialize($args));
}
return $class_object;