Win32::OLE

One of the most notable things I have discovered with the Win32::OLE extension is the way methods return values (or, I should say, do not return values). This deserves some clarification.

Most all Perl functions return some sort of value to indicate either success or failure. Win32::OLE is one of those rare exceptions. Now this really is not the extension’s fault because there is no way for the extension to know what the return value would represent. If a COM object’s method did not return any value, how could the Win32::OLE extension possibly know that the method is supposed to not return any value? For this reason, the extension is playing it smart by not making assumptions.

Suppose that I am playing around with MS Word, and I create ...

Get Win32 Perl Programming: The Standard Extensions, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.