On Wed, Oct 15, 2014 at 08:59:03AM +0200, H.Merijn Brand wrote: > On Tue, 14 Oct 2014 21:00:29 +0100, Dave Mitchell <davem@iabyn.com> > wrote: > > > Fourthly, we currently abuse ext/Devel-Peek/t/Peek.t (in a similar manner > > to ext/B/t/optree_concise.t) when we want to check SVs for having > > particular flags set etc. For similar reasons, I propose a new test file, > > t/perf/peek.t say, that will call Dump on an SV of interest, and return a > > hash of 'key = value' pairs; for example > > > > SV = PVAV(0x18a0208) at 0x18c9970 > > REFCNT = 1 > > FLAGS = () > > ARRAY = 0x0 > > FILL = -1 > > MAX = -1 > > ARYLEN = 0x0 > > FLAGS = (REAL) > > > > might be returned as the simple hash > > > > { > > SV => 'PVAV(0x18a0208) at 0x18c9970', > > REFCNT => '1', > > FLAGS => '()', > > ARRAY => '0x0', > > FILL => '-1', > > MAX => '-1', > > ARYLEN => '0x0', > > FLAGS => '(REAL)', > > } > > I did so in Data::Peek Ah, interesting. I was assuming that (possibly with mods) I would be able to make Peek.xs expose an API that allows you pass in a filehandle, then pass in a filehandle that's been opened to a var. -- Standards (n). Battle insignia or tribal totems.Thread Previous | Thread Next