Just for your reference, I originally thought Devel::NYTProf was
reporting a long time spent on the wrong line. I know this is not a
Devel::NYTProf issue and it is simply that I used Devel::NYTProf to
highlight the troublesome line. Here is a smaller, self contained
example which proves the line originally highlighted by Devel::NYTProf
is the problem:
use strict;
use warnings;
use Scalar::Util qw(tainted);
my $fd;
open($fd, ">", "file.dat");
print $fd 'x' x 4096;
close $fd;
my $data;
{
local $/;
open ($fd, "<", "file.dat");
$data = <$fd>;
close $fd;
}
print "data is tainted: ", tainted($data) ? 'yes' : 'no', "\n";
my %hash;
$hash{content} = '';
foreach (1..10000) {
# comment following line out to make this fly
my $ref = ref($hash{content});
#if (!$ref) {
$hash{content} .= $data;
#}
}
print length($hash{content}), "\n";
Problem exists at least until up to 5.12.1.
I will pursue this elsewhere now (although I'm not sure where right
now) and thanks for your help.
Martin
--
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]