- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I have a problem trying to retrive the data type of an object. I use the VMUtils::find_device method to get the cdrom especification.Then I need to obtain the backing data type (VirtualCdromRemoteAtapiBackingInfo or VirtualCdromIsoBackingInfo) but I don't know how to retrieve this info from $cdrom_spec->backing.
The value of $cdrom_spec is:
$VAR1 = bless( {
'deviceChange' => [
bless( {
'operation' => bless( {
'val' => 'remove'
}, 'VirtualDeviceConfigSpecOperation' ),
'device' => bless( {
'connectable' => bless( {
'allowGuestControl' => 0,
'connected' => 0,
'startConnected' => 1
}, 'VirtualDeviceConnectInfo' ),
'backing' => bless( {
'fileName' => ''
}, 'VirtualCdromIsoBackingInfo' ),
'unitNumber' => 0,
'controllerKey' => 200,
'key' => 3000
}, 'VirtualCdrom' )
}, 'VirtualDeviceConfigSpec' )
]
}, 'VirtualMachineConfigSpec' );
Does anybody know how could I retrieve the backing data type.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In perl, you can use "ref" to find out the type of thing being referenced. Here, it will be as follows:
> print ref($cdrom_spec->backing);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks njain, it works great!!