Revision: 1379
Author: [email protected]
Date: Mon Oct 11 13:14:06 2010
Log: grumble about undef source lines
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1379
Modified:
/trunk/lib/Devel/NYTProf/Reader.pm
=======================================
--- /trunk/lib/Devel/NYTProf/Reader.pm Sat Oct 2 14:52:02 2010
+++ /trunk/lib/Devel/NYTProf/Reader.pm Mon Oct 11 13:14:06 2010
@@ -414,6 +414,16 @@
$src_lines = [ $msg ];
$LINE = 0; # start numbering from 0 to flag fake contents
}
+
+ # ensure we don't have any undef source lines
+ # (to avoid warnings from the code below)
+ my $src_undefs;
+ defined $_ or $_ = '' && ++$src_undefs for @$src_lines;
+ # XXX shouldn't be need but don't have a test case so grumble
+ # about it in the hope of getting a test case
+ warn sprintf "Saw %d missing (undef) lines in the %d lines of
source code for %s\n",
+ $src_undefs, scalar @$src_lines, $filestr
+ if $src_undefs;
# 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.
--
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]