Reputation: 6302
In a project I am working on the directory layout that does not have a lib directory so we have
/X.pm
/X/Y.pm
...
/t/test.t
when I run
$ PERL5OPT=-MDevel::Cover make test
$ cover
I get report only for the files in t/
how can I tell Devel::Cover to report about all the files in the current directory except those in t?
I thought I can do it by this:
cover -t +inc . -inc t
but I get:
Unknown option: inc
Invalid command line options at /home/gabor/perl5/lib/perl5/x86_64-linux-thread-multi/Devel/Cover/Report/Html_minimal.pm line 677.
from the documentation it is unclear to me how can I supply these options.
Upvotes: 2
Views: 1263
Reputation: 129363
cover
doesn't actually generate coverage statistics, only reports on it IIRC.
Also, the +inc
seems to need to be a part of PERL5OPT (comma separated to have -M pass them to import()
, e.g. -MDevel::Cover=+inc,"/sometething"
)
I could be wrong - I only ever use Devel::Cover when actually running .t files, so never tried to do "all modules in directory" approach.
Upvotes: 1