Subject: | Devel::Cover bug - Running "exec" function causes coverage data be lost |
Date: | Tue, 10 Oct 2006 13:52:13 -0700 (PDT) |
To: | bug-Devel-Cover [...] rt.cpan.org |
From: | Scott Wang <geckcatcher [...] yahoo.com> |
Here in some information:
(1) Version 0.55 Devel::Cover
(2) Perl v5.8.8
(3) SUSE93 Linux
When I was running below simple script exec.pl by coverage command "Perl -MDevel::Cover=-db,./cover_exec_db exec.pl", there was no any coverage data be generated from that. I think "exec" flushes out (in process) previous data from memory and causes coverage data be lost.
===============
#!/usr/bin/perl -w
# exec.pl
print "Print the first line\n";
print "Print the second line\n";
exec ('echo','hello');
=============
Is this a known issue or a bug?
If I used "system" or "``" to replace the "exec", coverage data was generated fine and I got 100% code coverage for my simple script exec.pl.
Thanks,
Scott