Revision: 1248
Author: [email protected]
Date: Thu May 27 06:53:15 2010
Log: Fix and simplify padding of source lines

http://code.google.com/p/perl-devel-nytprof/source/detail?r=1248

Modified:
 /trunk/lib/Devel/NYTProf/Reader.pm

=======================================
--- /trunk/lib/Devel/NYTProf/Reader.pm  Thu May 27 06:24:46 2010
+++ /trunk/lib/Devel/NYTProf/Reader.pm  Thu May 27 06:53:15 2010
@@ -380,7 +380,7 @@
# Since we use @$src_lines to drive the report generation, pad the array to # ensure it has enough lines to include all the available profile info.
         # Then the report is still useful even if we have no source code.
- $src_lines->[$_] ||= '' for @$src_lines-1 .. $max_linenum-1; # grow array
+        push @$src_lines, '' while @$src_lines < $max_linenum-1;

         if (my $z = $stats_by_line{0}) {
             # typically indicates cases where we could do better

--
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.

Group hosted at:  http://groups.google.com/group/develnytprof-dev
Project hosted at:  http://perl-devel-nytprof.googlecode.com
CPAN distribution:  http://search.cpan.org/dist/Devel-NYTProf

To post, email:  [email protected]
To unsubscribe, email:  [email protected]

Reply via email to