Modifying Property Values
You can modify a data object's property value by passing a new value.
The following sample code shows how to pass the new value.
$data_object-> <property> (<new value>);
$data_object
is a blessed
reference to a Perl object or class name, and
property
is a method call on the object.
For example, you can change the
force
property to
false
, as follows.
$host_connect_spec->force ('false');
To create an enumeration data object, use a string value as the argument to the enumeration type's constructor.
my $power_state = VirtualMachinePowerState->new('poweredOff');
Typically, enumerations are used as arguments to methods.
$vm->MigrateVM( host => $target_host, priority => VirtualMachineMovePriority->new('defaultPriority'), state => VirtualMachinePowerState->new('poweredOff'), );