-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Anonymous block shows first line not covered #324
Comments
Thanks very much for this report. It certainly does look like a bug. Could you please post the output of I suspect we'll need to look into what the optree looks like in these cases and perhaps craft something to recognise that and report correctly. |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I have an anonymous block (for encapsulation or other similar purposes), the first line usually shows up as uncovered, as I described here (running with Devel::Cover 1.40)
x.pl
run:
output:
The coverage report shows line 6 with two rows in the statement column, the second of which shows as uncovered.
If I change it to a
do
block instead, thedo
line shows up as uncovered, instead of the firstmy
line.and perlmonk haukex reduced it to an even simpler case
{ sub x {} } x()
, which I have expanded slightly so you can see the line numbers for which statements show as uncovered.All three of those simple scripts actually execute every statement at least once, so it really appears there's a bug in the statement coverage.
The text was updated successfully, but these errors were encountered: