James E Keenan wrote:
Scott Wang wrote:
Hi Chris,
I am still confus.
For example,
On my Linux box, I have a module
"/tmp/experiment/lib/module_to_test.pm" to be tested, and I have two
Perl unit test scripts "/tmp/experiment/tests/test1.pl" and
'"/tmp/experiment/tests/test2.pl" to load the module_to_test.pm module
and execute the subroutines in it. Then, what are exact "perl
-MDevel::Cover" commands I could use to get the module_to_test.pm
module code coverage data from running test1.pl and test2.pl unit test
scripts? I am new in Perl, appreciate your detail information.
Scott:
With all due respect, I think your confusion is self-inflicted. You
acknowledge that you are new to Perl and to Devel::Cover in particular,
but you are trying to do things in a way (a) that would take an
experienced Perl programmer a lot of time to hack up; and (b) that an
experienced Perl programmer would not even bother with. Why not?
Because experienced Perl programmers know that the Perl community
worldwide has expended considerable effort developing certain standard
practices which work right out of the box.
In particular, experienced Perl programmers, when developing and testing
a module, structure the module's distribution in a particular way. Using
your directory names:
I've only been half-reading this thread (with holidays and fighting off
a cold), but my impression is that Scott has *installed* modules that he
wishes to test rather than a distribution to test. Wanting to test
installed modules seems a reasonable thing to do for internal/private
use modules that don't need to be created as distributions. However, I
don't know of any current way to do this or of any infrastructure that
would assist here.
Randy.
- Re: How to use Devel::Cover? Randy W. Sims
-