Frage

My dir/files are like this:

/lib/a.pm
/lib/b.pm
/lib/c.pm
..
/lib/n.pm

/lib/start.pl

start.pl is an interactive program, it will call different pm based on my selection.

when I run start.pl with

Devel::Cover :  PERL5OPT=-MDevel::Cover /lib/start.pl 

the output html report will list all the pms start.pl called. I want to list all pms. All, include those pms start.pl called ,and those without called. This will help me to get what pm not use during my current test.

Can this be done by Devel::Cover??

War es hilfreich?

Lösung

Unfortunately not. If no part of a module has been executed, Devel::Cover doesn't know about the module.

Andere Tipps

If I am correct Devel::Cover is used with prove to detect the coverage of your test.

You should write tests then you could use Devel::Cover.

Short tutorial (windows based): http://perl-node-interface.blogspot.co.uk/2011/06/how-to-use-develcover.html

Official tutorial: http://search.cpan.org/dist/Devel-Cover/lib/Devel/Cover/Tutorial.pod

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top