Author: tim.bunce
Date: Mon Nov 3 08:15:37 2008
New Revision: 585
Modified:
trunk/lib/Devel/NYTProf/Data.pm
Log:
Fix srclines_array() to drop the undef 0th line of source code.
Modified: trunk/lib/Devel/NYTProf/Data.pm
==============================================================================
--- trunk/lib/Devel/NYTProf/Data.pm (original)
+++ trunk/lib/Devel/NYTProf/Data.pm Mon Nov 3 08:15:37 2008
@@ -1052,8 +1052,11 @@
my $self = shift;
my $profile = $self->profile;
#warn Dumper($profile->{fid_srclines});
- if (my $srclines = $profile->{fid_srclines}[ $self->fid ]) {
- return [ @$srclines ]; # shallow clone
+ my $fid = $self->fid;
+ if (my $srclines = $profile->{fid_srclines}[ $fid ]) {
+ my $copy = [ @$srclines ]; # shallow clone
+ shift @$copy; # line 0 not used
+ return $copy;
}
# open file
my $filename = $self->filename;
--~--~---------~--~----~------------~-------~--~----~
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]
-~----------~----~----~----~------~----~------~--~---