Previous Entry Share Next Entry
"... now we have to find Perl's char* memory address holding the C string in $struct above. the only default thing in Perl that can do this is Devel::Peek, which can only write it to stderr. And at an XS layer, not a PerlIO layer, so we can't even tie the filehandle to a Perl class. The only way to capture Devel::Peek's output is to dup2 the stderr fd to another file, then parse that file."

When all you have is a hammer. ...