in reply to Re: NYTProf line report failure
in thread NYTProf line report failure

I can't provide a sscce because it's a very large module. I was using 6.05 but upgraded to 6.06 after your inquiry. It still fails with the same errors except one minor difference I don't understand (2695 -> 2698):
collapse_sibling_evals: nested evals in (eval 2695)
collapse_sibling_evals: nested evals in (eval 2698)
Debugging nytprof is over my head but I can see from the comments around line 430 in /Devel/NYTProf/FileInfo.pm that someone anticipated problems. How would you patch this?
# Should return the filename that the application used when loading th +e file # For evals should remove the @INC portion from within the "(eval N)[$ +path]" # and similarly for Class::MOP #line evals "... defined at $path". # This is a bit of a fudge. Filename handling should be improved in th +e profiler. sub filename_without_inc { my $self = shift; my $f = [$self->filename]; strip_prefix_from_paths([$self->profile->inc], $f, # line 430 qr/(?: ^ | \[ | \sdefined\sat\s )/x ); return $f->[0]; }

Replies are listed 'Best First'.
Re^3: NYTProf line report failure
by swl (Prior) on Mar 12, 2020 at 02:49 UTC

    The first thing I would try is to avoid the inc call, which is what bliako does in 11114118.

    It is probably worth instrumenting the code block with print statements to see what happens in this code under normal circumstances for a simplified script with nested evals. Or you could use the debugger if you are familiar with it or have access to one through an IDE.

    (Edit 20201303 - use code, not para, tags for "inc".)