|
And here is a version that works in my environment. I simply removed the square brackets on lines 17, 22 and 23. I also modified lines 5 and 12 to ask only current devices (C).
I still have a warning that reports an uninitialized value in concatenation (line 8) and an undefined subroutine &main::odm_classes on line 12.
--- SOURCE ---
use AIX::ODM;
my %odm = odm_dump('C');
while ( ($ndx1, $lev2) = each %odm ) {
while ( ($ndx2, $val) = each %$lev2 ) {
print "odm{${ndx1}}{${ndx2}} = ${odm{${ndx1}}{${ndx2}}}\n";
}
}
my %dev = odm_classes('C');
foreach ${devname} ( keys %dev ) {
print "dev{${devname}} = ${dev{${devname}}}\n";
}
my %attribs = odm_attributes($dev{'devname'});
foreach ${attrname} ( keys %attribs ) {
print "attribs{${attrname}} = ${attribs{${attrname}}}\n";
}
my ${devclass} = odm_class('C|P',$dev{'devname'});
my ${devsubcl} = odm_subclass('C|P',$dev{'devname'}); |