Devel::NYTProf is a powerful feature-rich source code profiler for Perl. (Mostly in maintenance mode, so PRs are much more likely to be acted upon than Issues.)
In a pending pull request I extend the coverage which the test suite provides to lib/Devel/NYTProf/FileInfo.pm. As of this pull request, when I run cover (first with trace unset and then with NYTPROF_TEST="trace=5", I get this coverage:
File stmt bran cond sub total
blib/lib/Devel/NYTProf/FileInfo.pm 94.4 71.8 65.0 100.0 87.6
While all subroutines are exercised, the statement, branch and condition results are much less satisfactory than I would hope. Analysis shows that there is nothing in the existing test suite which exercises the case where Devel::NYTProf::FileInfo->is_eval() returns a true value.
The consequence of this is that there are statements in the following subroutines which are not exercised:
is_file
sibling_evals
So far I have not been able to construct any case for t/13-fileinfo.t where the FileInfo object is a "string eval" -- notwithstanding the fact that there are instances in the test suite where string evals are indeed exercised, e.g.:
In a pending pull request I extend the coverage which the test suite provides to
lib/Devel/NYTProf/FileInfo.pm
. As of this pull request, when I runcover
(first with trace unset and then withNYTPROF_TEST="trace=5"
, I get this coverage:While all subroutines are exercised, the statement, branch and condition results are much less satisfactory than I would hope. Analysis shows that there is nothing in the existing test suite which exercises the case where
Devel::NYTProf::FileInfo->is_eval()
returns a true value.The consequence of this is that there are statements in the following subroutines which are not exercised:
So far I have not been able to construct any case for
t/13-fileinfo.t
where the FileInfo object is a "string eval" -- notwithstanding the fact that there are instances in the test suite where stringeval
s are indeed exercised, e.g.:Does anyone know how to construct a test case in which
FileInfo->is_eval
returns true?Thank you very much. Jim Keenan