On Fri, 1 Feb 2002, Simon Glover wrote: > > There are a number of set ops documented in core.ops that haven't > actually been implemented - conversion from STR to INT/NUM (and > vice versa), plus conversion from PMCs to STR. > > The enclosed patch implements the last of these, and adds tests for > PerlUndefs and PerlStrings (and implicitly PerlInts and PerlNums - > should we also add explicit tests for these?). I haven't added tests
Yes. > for arrays/hashes, as I'm unclear what, if anything, they should > actually be returning in this context. I'd imagine exactly the same as "@array" does in perl now, hashes are, er, more difficult. > + set P0, "\0" > + set S0, P0 > + print P0 > + print S0 I don't think it's wise to output NULs, using C< eq S0, "\0" ...> is a better way. > + set P0, 1.234567 > + set S0, P0 > + print P0 > + print "\\n" > + print S0 > + print "\\n" > +output_is(<<"CODE", <<'OUTPUT', "undef-string"); > + new P0, PerlUndef > + set S0, P0 > + end > +CODE > +OUTPUT Having no output from a test is bad, as it is indistinguishable from a segfault (although the suite might note this now). Also we'll want to be very careful about testing PerlUndef once we've added warnings in. Alex Gough
