devel-nytprof icon indicating copy to clipboard operation
devel-nytprof copied to clipboard

nytprofmerge: uninit $srclines_array when merged [rt.cpan.org #75916]

Open timbunce opened this issue 10 years ago • 0 comments
trafficstars

Migrated from rt.cpan.org#75916 (status was 'stalled')

Requestors:

From [email protected] on 2012-03-20 15:06:03:

After merging a small group of nytprof.out files using nytprofmerge,
reading the merged file using Devel::NYTProf::Data generates many warnings
that I didn't get from any of the individual files:

    $ perl -MDevel::NYTProf::Data -lwe '$|=1; Devel::NYTProf::Data->new({filename=>"nytprof-t6.out"})' 2>&1 | uniq -c
          1 Reading nytprof-t6.out
          1 
          1 Processing nytprof-t6.out data
          1 
       6300 Use of uninitialized value $srclines_array in join or string at /opt/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux-ld/Devel/NYTProf/FileInfo.pm line 491.

Looking at the code, I believe the warning is incorrectly identifying
the uninitialised value; it must be elements of @$srclines_array, not
$srclines_array itself, that are undef.

-zefram

From [email protected] on 2012-12-26 16:50:03:

I'd appreciate a test case for this.

timbunce avatar Feb 22 '15 13:02 timbunce