Once upon a time, Richard W.M. Jones rjones@redhat.com said:
I shouldn't say "not possible", but not very easy. A virDomainPtr in Sys::Virt is wrapped in some object which is very specific to the internals of Sys::Virt, thus cannot be extracted by Sys::Guestfs. It would require Sys::Virt to have a separate C library to provide this.
No, it wouldn't require a separate C library, just a way to export it. This has nothing to do with it being a pointer (or the language being perl); something that is internal to one object/library/module/etc. and not exported can't be accessed from another object/library/module/etc.