Skip to content
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

db option not recognized in 1.38 #316

Open
hedges333 opened this issue Feb 17, 2023 · 3 comments
Open

db option not recognized in 1.38 #316

hedges333 opened this issue Feb 17, 2023 · 3 comments

Comments

@hedges333
Copy link

hedges333 commented Feb 17, 2023

Trying to do cover -db /tmp/cover_db with v1.38.

Unknown option: db
Invalid command line options at /[omitted]/lib/perl5/x86_64-linux/Devel/Cover/Report/Html_minimal.pm line 714.

I tried adding it as HARNESS_PERL_SWITCHES=-MDevel::Cover=-db,/tmp/cover_db and that didn't help either.

Thanks.

@hedges333
Copy link
Author

In bin/cover I found it's undocumented that I can run it as cover /tmp/cover and it will shift the DB path from @ARGV.

@hedges333
Copy link
Author

Not sure how to open a PR since I can't push my branch but here is "the solution":

diff --git a/lib/Devel/Cover.pm b/lib/Devel/Cover.pm
index ec9422dd..21063330 100644
--- a/lib/Devel/Cover.pm
+++ b/lib/Devel/Cover.pm
@@ -1331,6 +1331,12 @@ To alter default values:

  perl -MDevel::Cover=-db,cover_db,-coverage,statement,time yourprog args

+To report from or delete a DB file in an alternate location:
+
+ perl -MDevel::Cover=-db,/tmp/cover_db
+ cover /tmp/cover_db
+ cover /tmp/cover_db -delete
+
 =head1 DESCRIPTION

 This module provides code coverage metrics for Perl.  Code coverage metrics

@jsoref
Copy link

jsoref commented Jul 15, 2024

@hedges333: fwiw, to create a PR, you'd first use https://github.com/pjcj/Devel--Cover/fork to create a fork, and then push your branch to your fork, and finally create the PR to this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants