[perl #115768] improve (caller)[2] line numbers
authorFather Chrysostomos <sprout@cpan.org>
Sun, 1 Sep 2013 00:47:23 +0000 (17:47 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 1 Sep 2013 18:32:07 +0000 (11:32 -0700)
commit25502127feba592f2312380b350122c445020707
tree114d7f6ac5b79b5922af4dded2493bc732952083
parentecadf9b7005812a5eb20b351ef9bcd042c7e3daf
[perl #115768] improve (caller)[2] line numbers

warn and die have special code (closest_cop) to find a nulled
nextstate op closest to the warn or die op, to get the line number
from it.  This commit extends that capability to caller, so that

  if (1) {
    foo();
  }
  sub foo { warn +(caller)[2] }

shows the right line number.
embed.fnc
embed.h
pp_ctl.c
proto.h
t/op/caller.t
util.c