Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Wow, thanks Ovid! I never realized that problem existed. Just to explain, whenever a nextstate op is seen the global variable PL_curcop is set and that's some of what caller() uses. You know line 50 as you enter the loop, then the first line in the loop is 51 but you never reach that outer nextstate op to say you're testing a condition on line 50 again. I bet if you were really interested in solving this problem in a JFDI way that you could change that "goto 9" to be "goto 2" or promote the conditional expression into a do{} block. But that way lies madness so you won't do that.

### caller() will report line 50. 2 <;> nextstate(main 2 x:50) v 3 <{> enterloop(next->8 last->d redo->4) v 9 <0> pushmark s a <#> gv[*X] s/EARLYCV b <1> entersub[t2] sKS/TARG,1 c <|> and(other->4) vK/1 ### caller() will report line 51 4 <;> nextstate(main 1 x:51) v 5 <0> pushmark s 6 <#> gv[*Y] s/EARLYCV 7 <1> entersub[t4] vKS/TARG,1 8 <0> unstack v goto 9 d <2> leaveloop vK/2 e <@> leave[1 ref] vKP/REFC

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

In reply to Re^3: Where was I called? by diotalevi
in thread Where was I called? by Ovid

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2021-08-04 10:21 GMT
Find Nodes?
    Voting Booth?
    My primary motivation for participating at PerlMonks is: (Choices in context)

    Results (41 votes). Check out past polls.