-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul Johnson wrote:
> On Fri, Jun 16, 2006 at 12:43:11PM +0530, Rajanikanth Dandamudi wrote:
> 
>> Hi All,
>>
>> Can some one help me understand why I am getting the following message 
>> on the following perl program :
>>
>> perl program
>> ============
>> #!/usr/local/bin/perl
>>
>> %hsh = (
>>      ABC => -abc,
>>      DEF => -def,
>>        );
>>
>> for $key (keys %hsh){
>>   print "Key = $key Value = $hsh{$key}\n";
>> }
>> =============
>>
>> command used : perl -MDevel::Cover <aboveProgram>
>>
>> output:
>> =======
>> Devel::Cover 0.55: Collecting coverage data for branch, condition, 
>> statement, subroutine and time.
>>     Pod coverage is unvailable.  Please install Pod::Coverage from CPAN.
>> Selecting packages matching:
>> Ignoring packages matching:
>>     /Devel/Cover[./]
>> Ignoring packages in:
>>     .
>>     /proj/dite/WorkArea/Raja/perl/lib
>>     /proj/dite/WorkArea/Raja/perl/lib/5.8.8
>>     /proj/dite/WorkArea/Raja/perl/lib/5.8.8/i686-linux
>>     /proj/dite/WorkArea/Raja/perl/lib/site_perl
>>     /proj/dite/WorkArea/Raja/perl/lib/site_perl/5.8.8
>>     /proj/dite/WorkArea/Raja/perl/lib/site_perl/5.8.8/i686-linux
>> Key = ABC Value = -abc
>> Key = DEF Value = -def
>> Devel::Cover: Can't find file "../../lib/Storable.pm": ignored.
>> Devel::Cover: Writing coverage database to 
>> /sp/dftm/Activities/MemoryBIST/pbist/flow/data/cover_db/runs/1150441786.22790.00593
>> ----------------------------------- ------ ------ ------ ------ ------ 
>> ------
>> File                                  stmt   bran   cond    sub   time 
>> total
>> ----------------------------------- ------ ------ ------ ------ ------ 
>> ------
>> ...6905/LearnPerl/Hash_Example_2.pl  100.0    n/a    n/a    n/a  100.0 
>> 100.0
>> Total                                100.0    n/a    n/a    n/a  100.0 
>> 100.0
>> ----------------------------------- ------ ------ ------ ------ ------ 
>> ------
>> =========
>>
>> I couldn't understand what the following message means :
>>
>> Devel::Cover: Can't find file "../../lib/Storable.pm": ignored.
>>
>> Even though this is being ignored here, this is causing problems down 
>> the line. Can you help me on what this means and how to overcome this ?
> 
> What it means is that when Devel::Cover went to examine all the data it
> had collected and map it back to reality, it went looking for the source
> code to Storable.  When perl first loaded Storable it was found in the
> relative directory "../../lib/Storable.pm".  What that was relative to,
> we don't really know.  Perl doesn't store that information.
> 
> Devel::Cover tries very hard to find that information (I won't go into
> the details, but it is messy), but doesn't always succeed.  In
> particular, this warning is fairly common, and I haven't been able to
> track it down, though I suspect it has something to do with Storable
> being used by Devel::Cover itself and so it is loaded before
> Devel::Cover's hacks get a chance to kick in.
> 
> What this means in practice is that you won't get a coverage report for
> Storable.  But it's pretty unlikely you wanted one anyway, so this
> shouldn't be a great problem.  So I am interested in what problems this
> causes down the line.  To stop the warning I suggest the following
> options:
> 
>   1.  Fix Devel::Cover.  Go on, please.  You know you want to ;-)
>   2.  Hack the source to disable the warning.
>   3.  Filter the output.
>   4.  Pretend you didn't see it.
> 
> Most people take the fourth option since it really shouldn't cause any
> further problems.
> 
fwiw:
Devel::Cover 0.55: Collecting coverage data for branch, condition, pod,
statement, subroutine and time.
Selecting packages matching:
Ignoring packages matching:
    /Devel/Cover[./]
Ignoring packages in:
    .
    /usr/lib64/perl5/5.8.8
    /usr/lib64/perl5/5.8.8/x86_64-linux
    /usr/lib64/perl5/site_perl
    /usr/lib64/perl5/site_perl/5.8.8
    /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux
    /usr/lib64/perl5/vendor_perl
    /usr/lib64/perl5/vendor_perl/5.8.8
    /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux
Key = ABC Value = -abc
Key = DEF Value = -def
Devel::Cover: Writing coverage database to
/home/cover_db/runs/1150852181.9923.33847
- ---------------------------- ------ ------ ------ ------ ------ ------
- ------
File                           stmt   bran   cond    sub    pod   time
total
- ---------------------------- ------ ------ ------ ------ ------ ------
- ------
test                          100.0    n/a    n/a    n/a    n/a  100.0
100.0
Total                         100.0    n/a    n/a    n/a    n/a  100.0
100.0
- ---------------------------- ------ ------ ------ ------ ------ ------
- ------



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEmJy1q1ztTp5/Ti4RAjeWAJ40MyYNGhWidkG4MjQJLP867pt75wCfUdqw
6GQXJcScJKB3FGtrKyuaGgA=
=YkPW
-----END PGP SIGNATURE-----

Reply via email to