in reply to Can I track which address Perl code is using?
Devel::Peek is probably what you're after. This will (from Perl) dump the addresses and flags of a module. Also see the refaddr method in Scalar::Util.
You could try wrapping the XS function in a Pure Perl method that uses the above to dump info on its arguments.
Here's an example of calling Devel::Peek::Dump from XS, which can be darned handy too:
ENTER; SAVETMPS; PUSHMARK(sp); XPUSHs(sv); PUTBACK; perl_call_pv("Devel::Peek::Dump", G_SCALAR|G_DISCARD); FREETMPS; LEAVE;
You'll also need dSP; at the beginning of your function to declare the sp variable; in the above, sv is the dumped variable.
$h=$ENV{HOME};my@q=split/\n\n/,`cat $h/.quotes`;$s="$h/." ."signature";$t=`cat $s`;print$t,"\n",$q[rand($#q)],"\n";
|
|---|