Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: what type of dsc is this

by Anonymous Monk
on Oct 08, 2018 at 09:47 UTC ( [id://1223665]=note: print w/replies, xml ) Need Help??


in reply to what type of dsc is this

What you see is one of the ways to hide a pointer to an opaque C structure in a Perl object returned to the library user. (Use Dump on an Image::Magick object to see a different one.) As others have already pointed out, recreating these objects from such dumps is probably a bad idea because the pointer that's stored somewhere is no longer valid (or, if it is, destroying the recreated object will also free the memory belonging to the original).

See http://gtk2-perl.sourceforge.net/doc/binding_howto.pod.html for more information on how it is achieved and perlxstut for more information about the language used to extend Perl with code written in C.

Replies are listed 'Best First'.
Re^2: what type of dsc is this
by LanX (Saint) on Oct 08, 2018 at 13:17 UTC
    All true, but I don't think the OP is attempting to serialize XS objects, he's trying to inspect structures while "playing around"

    No need to dive into Perl 's XS guts then.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1223665]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-19 22:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found