-
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
Really questionable design decision when target in @INC #332
Comments
Hello! The reason for working this way is that in general we're not interested in coverage for core perl modules or cpan modules. And, my suspicion initially, was that in general we wouldn't be interested in the coverage of any modules found in If we were to change this, what would you have expected to see from your first example - the same as for the second? Would you expect to see coverage for any core or cpan modules used? What about any other modules in |
Yes, the same as the second.
My answer there would be that I would not personally use this to hide coverage of core modules. I would make the utility behave consistently everywhere. If you want to hide the coverage from modules in |
But you didn't see any core or cpan coverage in your second example, did you? Hence my followup questions. I'm not really sure what you meant by "everything works" in the second example because you would usually run coverage on your test suite rather than on a module. So perhaps there's something else going on here. Is I'm not really convinced that you do want to see core and cpan coverage along with coverage of your own modules. Apart from being expensive to calculate, what are you going to do with this information? Well, perhaps you do want that, but I'm fairly sure that most people don't. That's why things are the way they are. But if you do want coverage for absolutely everything it's fairly easy to get - use |
No, I don't. In the second example I don't see any cpan coverage. But that's because presumably I'm targeting a specific file. Why would I see cpan coverage in it. Here is my coverage report,
The problem is |
It's been a while since I have replied here. Part of the reason is because I lost enthusiasm every time I read the title. But also I'm really not sure what you are trying to do. Or perhaps why. Is your Devel::Cover is primarily designed for the case where you have a distribution to be tested, probably in |
I work for cPanel. cPanel puts it's code, binary, and tests /usr/local/cpanel which is in PERL5LIB. I want to test the coverage of the code in a pipeline. I'm not defending cPanel's practice. It's wrong. But it's also not against any rule of Perl. It's just wrong by convention. I'm only suggesting that perhaps the library shouldn't impose a convention the language itself doesn't impose. |
Two things:
In any case, I think the default is correct for most people who use more standard layouts. Try using |
If I do
Nothing works: empty report generated.
However.... If I do,
Everything works. This is actually documented... HOWEVER Nothing works like this.
This is supremely bizarre. Why?! Can't we change this behavior to either,
The text was updated successfully, but these errors were encountered: