I've been playing around with xs lately and I've got to admit, I haven't fumbled around this much since I was a teenager

What I was trying to do (and have done) is to hack Padwalker to returns the padlist names and current values as regular array references for the intent of adding lexicals. (Why I want to do this is another story for another post), It works fine so far "almost" (Though you have to set the PADMY_on and PADTMP_off after setting a value) but one thing has been troubling me.

When iterating, the inserted lexical is retaining it's value. I would assume that this is because there is no padsv call, but then I came across this from Extending and Embedding Perl
"op_seq is a sequence number allocated by the optimizer. It allows for, for instance, correct scoping of lexical variables by storing the sequence numbers of the beginning and end of scope operations inside the pad."


I've tried googling but haven't come up with any better explanation of what this means.

Does anyone care to try and expand on this in a way that I might be able to grasp? :)

Thanks,
-Lee

"To be civilized is to deny one's nature."

In reply to What does op_seq do? by shotgunefx

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.