Eric Hennessey <[EMAIL PROTECTED]> writes:
> I need to programmatically duplicate certain metabase entries to another
> server. So, if I issue the following from my script:
> my $MetabaseObj = Win32::OLE->GetObject ('IIS://localhost/MSFTPSVC/1');
> I now have a variable, $MetabaseObj, containing the keys for the MSFTPSVC/1
> entry in my metabase.
>
> This variable appears to be a hash reference, yet I can't seem to treat it
> as such. Has anybody tried to process metabase objects in a similar
> fashion?
I do not know the solution to your problem. However...
In your example, the MetabaseObj variable does provide the interface
of a hash reference, but it is not a simple Perl hash. It is using
Perl's "tie" machinery to provide a hash-like interface to the COM
"properties" of the underlying COM object. So every time you access
an element of that hash, Win32::OLE is actually making some COM call
for you.
Properties can be read-only, so "copying" one COM object to another is
not necessarily simple.
As I said, I do not know the actual solution to your problem. You
might try asking on one of the VB groups; sample VB code, or even just
a pointer in the right direction, should make it easy to answer your
question in Perl.
- Pat
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs