Re: Devel::Cover not DWIMming on upgraded Perl -- but problem solved
James, The explanation is that D::C saves a copy of your @INC at build time in a .pm and subsequently uses that list to filter out the code perl libraries. That @INC probably had some /5.8.4/ subdirs in it. With the new Perl, the @INC now has /5.8.7/ subdirs and those aren't being filtered. When I first discovered that detail, I thought Why can't D::C just look at @INC at runtime? The answer, of course, is that you've probably changed @INC with -Mblib or -Ilib or 'use lib qw(.);' or something. So, there has to be a pristine @INC to reference. I haven't fully thought this out, but it seems to me that some combination of @INC from %Config and $ENV{PERL5LIB} should cover pretty much all of core, so perhaps D::C can do away with the hard- coded @INC filter list in the future? Chris On Nov 1, 2005, at 7:25 PM, James E Keenan wrote: When I began to write this posting, it was to get an answer to a question. But I figured out a workaround halfway through, so now I'm posting an answer. I have happily been using Devel::Cover for more than a year on Perl 5.8.4 on Darwin (Mac OS X 10.3). Recently I upgraded to Perl 5.8.7. Tonight I went to use Devel::Cover (v0.55, as previously) for the first time since that Perl upgrade. At first, it no longer DWIMmed. Specifically: 1. When I ran 'make test HARNESS_PERL_SWITCHES=MDevel::Cover', I got this message: t/01_test.. This version of Devel::Cover was built with Perl version 5.008004. It is now being run with Perl version 5.008007. Attempting to make adjustments, but you may find that some of your modules do not have coverage data collected. You may need to alter the +- inc, +-ignore and +-select options. t/01_test..ok I'd never had to set these options before; previously, D::C just worked. Also, D::C took much longer to run. 2. I was testing coverage of a new module I'm developing called File::Save::Home. When I called 'cover', I got a report on this module, but also on every core module as well: [snip] -- -- -- -- -- -- -- File stmt bran condsubpod time total -- -- -- -- -- -- -- ...perl5/5.8.7/AutoLoader.pm0.00.00.00.00.0 n/a0.0 ...l/lib/perl5/5.8.7/Carp.pm0.00.00.00.00.0 n/a0.0 ...erl5/5.8.7/Digest/base.pm0.00.0n/a0.00.0 n/a0.0 ...b/perl5/5.8.7/Exporter.pm 50.0 57.1 44.7 33.30.0 0.3 44.8 ...5/5.8.7/Exporter/Heavy.pm 10.48.8 12.5 11.10.0 0.19.8 ...l5/5.8.7/File/Basename.pm 28.2 25.87.7 50.0 100.0 0.1 27.8 [snip] 8.7/warnings/register.pm 100.0 50.0n/a 100.00.0 0.1 89.5 blib/lib/File/Save/Home.pm 77.1 44.4n/a 100.0 100.0 0.3 73.4 Total 10.86.24.3 12.3 14.0 100.09.0 -- -- -- -- -- -- -- Writing HTML output to /Users/jimk/work/fsh/File-Save-Home/cover_db/coverage.html ... done. This problem of excessive output is the same one I typically experience using D::C (v0.47, I believe) on Windows. This is much more output than I want or need. I hypothesized that if I were to upgrade to a new version of D::C, it would be compiled against Perl 5.8.7 and these problems might go away. But 'cpan' did nothing because it detected that I was using the most recent version of D::C. So I downloaded the latest version of Devel::Cover from CPAN and installed it manually. (I did call 'make install UNINSTALL=1'.) This solved the problem. The message described above went away, and 'cover' reported only the results for the module under development. Jim Keenan -- Chris Dolan, Software Developer, Clotho Advanced Media Inc. 608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703 Clotho Advanced Media, Inc. - Creators of MediaLandscape Software (http://www.media-landscape.com/) and partners in the revolutionary Croquet project (http://www.opencroquet.org/)
Re: Devel::Cover not DWIMming on upgraded Perl -- but problem solved
On Tue, Nov 01, 2005 at 08:25:36PM -0500, James E Keenan wrote: When I began to write this posting, it was to get an answer to a question. But I figured out a workaround halfway through, so now I'm posting an answer. I have happily been using Devel::Cover for more than a year on Perl 5.8.4 on Darwin (Mac OS X 10.3). Recently I upgraded to Perl 5.8.7. Tonight I went to use Devel::Cover (v0.55, as previously) for the first time since that Perl upgrade. At first, it no longer DWIMmed. Specifically: 1. When I ran 'make test HARNESS_PERL_SWITCHES=MDevel::Cover', I got this message: t/01_test.. This version of Devel::Cover was built with Perl version 5.008004. It is now being run with Perl version 5.008007. Attempting to make adjustments, but you may find that some of your modules do not have coverage data collected. You may need to alter the +-inc, +-ignore and +-select options. t/01_test..ok I'd never had to set these options before; previously, D::C just worked. Also, D::C took much longer to run. 2. I was testing coverage of a new module I'm developing called File::Save::Home. When I called 'cover', I got a report on this module, but also on every core module as well: [snip] -- -- -- -- -- -- -- File stmt bran condsubpod time total -- -- -- -- -- -- -- ...perl5/5.8.7/AutoLoader.pm0.00.00.00.00.0 n/a0.0 ...l/lib/perl5/5.8.7/Carp.pm0.00.00.00.00.0 n/a0.0 ...erl5/5.8.7/Digest/base.pm0.00.0n/a0.00.0 n/a0.0 ...b/perl5/5.8.7/Exporter.pm 50.0 57.1 44.7 33.30.0 0.3 44.8 ...5/5.8.7/Exporter/Heavy.pm 10.48.8 12.5 11.10.0 0.19.8 ...l5/5.8.7/File/Basename.pm 28.2 25.87.7 50.0 100.0 0.1 27.8 [snip] 8.7/warnings/register.pm 100.0 50.0n/a 100.00.0 0.1 89.5 blib/lib/File/Save/Home.pm 77.1 44.4n/a 100.0 100.0 0.3 73.4 Total 10.86.24.3 12.3 14.0 100.09.0 -- -- -- -- -- -- -- Writing HTML output to /Users/jimk/work/fsh/File-Save-Home/cover_db/coverage.html ... done. This problem of excessive output is the same one I typically experience using D::C (v0.47, I believe) on Windows. This is much more output than I want or need. I hypothesized that if I were to upgrade to a new version of D::C, it would be compiled against Perl 5.8.7 and these problems might go away. But 'cpan' did nothing because it detected that I was using the most recent version of D::C. So I downloaded the latest version of Devel::Cover from CPAN and installed it manually. (I did call 'make install UNINSTALL=1'.) This solved the problem. The message described above went away, and 'cover' reported only the results for the module under development. I don't know if that is in the documentation for Devel::Cover or not, but an upgrade in Perl usually requires and reinstall of Devel::Cover. Steve Peters [EMAIL PROTECTED]
Devel::Cover not DWIMming on upgraded Perl -- but problem solved
When I began to write this posting, it was to get an answer to a question. But I figured out a workaround halfway through, so now I'm posting an answer. I have happily been using Devel::Cover for more than a year on Perl 5.8.4 on Darwin (Mac OS X 10.3). Recently I upgraded to Perl 5.8.7. Tonight I went to use Devel::Cover (v0.55, as previously) for the first time since that Perl upgrade. At first, it no longer DWIMmed. Specifically: 1. When I ran 'make test HARNESS_PERL_SWITCHES=MDevel::Cover', I got this message: t/01_test.. This version of Devel::Cover was built with Perl version 5.008004. It is now being run with Perl version 5.008007. Attempting to make adjustments, but you may find that some of your modules do not have coverage data collected. You may need to alter the +-inc, +-ignore and +-select options. t/01_test..ok I'd never had to set these options before; previously, D::C just worked. Also, D::C took much longer to run. 2. I was testing coverage of a new module I'm developing called File::Save::Home. When I called 'cover', I got a report on this module, but also on every core module as well: [snip] -- -- -- -- -- -- -- File stmt bran condsubpod time total -- -- -- -- -- -- -- ...perl5/5.8.7/AutoLoader.pm0.00.00.00.00.0 n/a0.0 ...l/lib/perl5/5.8.7/Carp.pm0.00.00.00.00.0 n/a0.0 ...erl5/5.8.7/Digest/base.pm0.00.0n/a0.00.0 n/a0.0 ...b/perl5/5.8.7/Exporter.pm 50.0 57.1 44.7 33.30.0 0.3 44.8 ...5/5.8.7/Exporter/Heavy.pm 10.48.8 12.5 11.10.0 0.19.8 ...l5/5.8.7/File/Basename.pm 28.2 25.87.7 50.0 100.0 0.1 27.8 [snip] 8.7/warnings/register.pm 100.0 50.0n/a 100.00.0 0.1 89.5 blib/lib/File/Save/Home.pm 77.1 44.4n/a 100.0 100.0 0.3 73.4 Total 10.86.24.3 12.3 14.0 100.09.0 -- -- -- -- -- -- -- Writing HTML output to /Users/jimk/work/fsh/File-Save-Home/cover_db/coverage.html ... done. This problem of excessive output is the same one I typically experience using D::C (v0.47, I believe) on Windows. This is much more output than I want or need. I hypothesized that if I were to upgrade to a new version of D::C, it would be compiled against Perl 5.8.7 and these problems might go away. But 'cpan' did nothing because it detected that I was using the most recent version of D::C. So I downloaded the latest version of Devel::Cover from CPAN and installed it manually. (I did call 'make install UNINSTALL=1'.) This solved the problem. The message described above went away, and 'cover' reported only the results for the module under development. Jim Keenan