App-Test-Generator
view release on metacpan or search on metacpan
lib/Devel/App/Test/Generator/LCSAJ/Runtime.pm view on Meta::CPAN
return $f;
}
# --------------------------------------------------
# DB::DB
#
# Purpose: Called by the Perl debugger before every
# statement. Records (file, line) hits for
# later LCSAJ coverage analysis.
#
# Entry: No arguments â caller(0) is used to get
# the current file and line number.
#
# Exit: Returns nothing. Updates %HITS in place.
#
# Side effects: Increments %HITS{$norm}{$line}.
#
# Notes: This sub lives in the DB:: package as
# required by Perl's debugger protocol.
# It is called for every statement executed
# while the debugger is active, so it must
# be as fast as possible.
# Internal files and out-of-target files
# are skipped immediately.
# --------------------------------------------------
sub DB::DB {
my (undef, $file, $line) = caller(0);
return unless defined $file && defined $line;
# Resolve symlinks and relative components to a stable absolute path
my $abs = abs_path($file) // $file;
my $norm = _normalize($abs);
# Never record hits inside this module itself â suffix match is used
# so it works regardless of CWD or install prefix
return if $norm =~ m{(?:^|/)Devel/App/Test/Generator/LCSAJ/Runtime\.pm$};
( run in 2.118 seconds using v1.01-cache-2.11-cpan-437f7b0c052 )