When I changed this line:
push @stack_trace, [ (caller($i))[0 .. 3] ] while caller(++$i);
to this (taken straight from Devel::StackTrace):
while ( do { package DB; @DB::args = (); @c = caller($i++) } ) {
push @stack_trace, [ @c[0 .. 3] ];
}
(Note the post-increment
I am seeing some weird behavior where Devel::Cover seems to be
removing/consuming information I am trying to extract with caller(). I
have managed to isolate the behavior in a small script, which is
included below.
Anyone else seen this problem before? Am I doing something wrong? Or is
this a