"Devel::DProf" on a PERL script uses "Test::More"

"Devel::DProf" on a PERL script uses "Test::More"

am 06.12.2005 02:36:59 von tom

Dear all,

I encountered a problem while run profiling on a script which uses
"Test::More". May I ask whether anybody have some idea or wrap around
solution?

perl -d:DProf test.pl

Tom


Errror
-------
panic: Devel::DProf inconsistent subroutine return at
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/threads/shared. pm line 18.
BEGIN failed--compilation aborted at
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/threads/shared. pm line 35.
Compilation failed in require at /usr/lib/perl5/5.8.5/Test/Builder.pm
line 21.
BEGIN failed--compilation aborted at
/usr/lib/perl5/5.8.5/Test/Builder.pm line 28.
Compilation failed in require at /usr/lib/perl5/5.8.5/Test/More.pm line
6.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.5/Test/More.pm
line 6.

Re: "Devel::DProf" on a PERL script uses "Test::More"

am 06.12.2005 15:14:18 von Henry McGuinness

Well, I'm just learning to use these 2 modules, but in the docs for DProf
(for perl 5.8.7, this note wasn't there a couple of Perl versions ago) it
says, under "Bugs":

"Another problem is that if(3,n) a subroutine exits using goto(LABEL),
last(LABEL) or next(LABEL) then perl may crash or Devel::DProf will die
with the error:

panic: Devel::DProf inconsistent subroutine return

For example, this code will break under Devel::DProf:

sub foo {
last FOO;
}
FOO: {
foo();
}

A pattern like this is used by Test::More's skip() function, for
exam-
ple. See perldiag for more details."


HTH
Henry

"Tom" wrote in message
news:1133833019.183937.294740@g43g2000cwa.googlegroups.com.. .
> Dear all,
>
> I encountered a problem while run profiling on a script which uses
> "Test::More". May I ask whether anybody have some idea or wrap around
> solution?
>
> perl -d:DProf test.pl
>
> Tom

Re: "Devel::DProf" on a PERL script uses "Test::More"

am 08.12.2005 03:15:50 von tom

Thanks a lot.

I will investigate deeper in this direction. :)