Subject: | Documentation error for Mac::Components::GetComponentInfo() |
The documentation and code do not agree for the GetComponentInfo()
function in Mac::Components. The POD says the return values are:
$info, $name, $mask, $flags, $manufacturer, $subtype, $type
The code suggests that the return values are the reverse of that:
componentType
componentSubType
componentManufacturer
componentFlags
componentFlagsMask
name
info
The following test confirms that the latter is what the code actually does.
perl -e'use
Mac::Components;while($c=FindNextComponent($c)){@i=GetComponentInfo($c);print
"@i\n";}'
yields:
acca chnl appl 268435456 65941 AudioContext AudioContext Channel
adec .mp3 appl 268435456 65605 Apple MP3 Decoder An AudioCodec that
decodes MPEG-1, MPEG-2, MPEG-2.5 Layer III into linear PCM data
...
Additionally, the documentation omits mention that the GetComponentInfo
function returns only $name in scalar context.
-- Chris