|Problems? Is your data what you think it is?|
Working with COM objectsby MadraghRua (Vicar)
|on May 21, 2009 at 21:30 UTC||Need Help??|
MadraghRua has asked for the
wisdom of the Perl Monks concerning the following question:
Hi Monks I am working with a windows application that has a COM interface library. I have some example Jscript that runs that I am now converting into Perl. So the Jscript looks something like this:
This is my interpretation of this in Perl:
Its the second last line that I don't understand. If I understand what I am supposed to do, the $tool object needs to have the Data attribute populated with the $data object. When I dump $data and $tool, I see hashes populated with data. For instance in $tool I can see:
and so on. So in this hash you can see that 'Data' => undef - I would like it set to $data.
I have looked the the documentation for Win32::OLE and I'm simply not clear on what the syntactic sugar is that I need to assign the $data instance to the $tool->Data attribute. What I have shown typically throws the following warning: Win32::OLE(0.1707) error 0x80020003: "Member not found" in PROPERTYPUTREF "data" at script.pl line 12
I've tried variations on assigning the $data instance to $tool->Data,including
and so on.
I'm also open to any suggestions on what to try next. I'm also interested in finding out anything that that would allow me to observe the contents of the Jscript variables so I could better understand what is being passed there and where it is going.