Revision: 1092
Author: tim.bunce
Date: Mon Mar  1 12:16:33 2010
Log: Made 'No file line range data for sub' warning less scary

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

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

=======================================
--- /trunk/lib/Devel/NYTProf/Reader.pm  Sat Feb 20 08:31:12 2010
+++ /trunk/lib/Devel/NYTProf/Reader.pm  Mon Mar  1 12:16:33 2010
@@ -475,7 +475,7 @@
my ($file, $fid, $first, $last) = $self->{profile}->file_line_range_of_sub($sub);
     if (!$first) {
         if (not defined $first) {
-            warn("No file line range data for sub '$sub'\n")
+ warn("No file line range data for sub '$sub' (perhaps an xsub)\n") unless our $href_for_sub_no_data_warn->{$sub}++; # warn just once
             return "";
         }

--
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