Does anyone know the correct usage to create/set an enum type object? The user guide doco states the following:
To set a property (defined as an enum) on a data object:
$ref = new enum_type (val => value;)
For example, $power_state = new VirtualMachinePowerState (val => 'poweredOff');
When I data dump this object it doesn't set the val field though:
my $power_state = new VirtualMachinePowerState (val => 'poweredOff');
print Dumper($power_state);
Result:
$VAR1 = bless( {
'val' => 'val'
}, 'VirtualMachinePowerState' );