Studio:Perl and COM

From STRIDE Wiki
Revision as of 23:42, 21 June 2007 by Root (talk | contribs)
Jump to navigation Jump to search

Because of its multiplatform heritage, Perl is not a COM-aware language by default. The Win32::OLE package integrates COM with Perl, but there are some "features" of this library that might not be intuitive to Perl programmers.

Information under this heading would start with summarizing some of the key points from the Win32::OLE perldoc. Some points to cover:

  • We always recommend setting a warn level of 3. If you don't do this, COM errors won't be passed back to the script. In JScript, you always receive COM errors, so warn level 3 brings Perl in line with that behavior.
  • I seem to recall there were issues passing unicode strings from autoscript to Perl and it was resolved by changing some other settings in Win32::OLE (I believe) - check with Robert on that.
  • SetProperty is required for setting properties with arguments, such as with ascript's array types. You might also describe the difference between LetPropery and SetProperty. I don't know if there is anywhere in our interfaces that we are currently required to use LetProperty - if NOT, then maybe we shouldn't mention it (to avoid confusion).


...and other items could be proposed by SEs in the field working with Perl.