The vSphere SDK for Perl transparently uses the Data::Dumper Perl module (a standard library) to create the client-side view objects.
Example: Using Data::Dumper to Output Perl Object Structures illustrates how you can use
Data::Dumper to explore view objects and corresponding vSphere objects.
The output above shows the content of the summary.config.product property of a
HostSystem managed object. The type (or more properly class) of
summary.config.product property is
AboutInfo. Perl’s
Data::Dumper module writes the object in a form that can be used with
eval to get back a copy of the original structure. The
bless keyword indicates the data is a Perl object, and the last argument to
bless is the class of the object,
AboutInfo.
Line 19 (in Example: Using Data::Dumper to Output Perl Object Structures) retrieves the
HostSystem view object and line 21 prints the name associated with the corresponding host.
The config property has more values than those printed by line 23. Line 25 prints the entire
config object. Inside the
config object printed by line 25 (in
Example: Using Data::Dumper to Output Perl Object Structures), the
product property is an object. The
bless function returns a reference to the
product object, which is itself nested inside the
config object.
The output from line 27 of Example: Using Data::Dumper to Output Perl Object Structures prints the structure of the entire
summary object of the host view. The output shows a number of nested objects, including two objects that are nested two levels deep. The
product object is nested inside the
config object, and the
connectionState object is nested inside the
runtime object.