spx2 has asked for the wisdom of the Perl Monks concerning the following question:

panic: Devel::DProf inconsistent subroutine return at /usr/local/share/perl/5.10.0/JSON.pm line 54. What is this error and how do I fix it ? I'm running perl -d:DProf test_pack.pl and I'm getting the before-mentioned error. On checking the syntax I get no error
perl -wc test_pack.pl test_pack.pl syntax OK

Replies are listed 'Best First'.
Re: bizarre error "panic" with Devel::DProf
by almut (Canon) on May 31, 2009 at 02:25 UTC
    What is this error... ?
    $ echo "panic: Devel::DProf inconsistent subroutine return at /usr/loc +al/share/perl/5.10.0/JSON.pm line 54." | splain panic: Devel::DProf inconsistent subroutine return at /usr/local/share/perl/5.10.0/JSON.pm line 54 (#1) (P) Devel::DProf called a subroutine that exited using goto(LABEL) +, last(LABEL) or next(LABEL). Leaving that way a subroutine called f +rom an XSUB will lead very probably to a crash of the interpreter. Thi +s is a bug that will hopefully one day get fixed.

    So maybe check if that is what's happening at .../JSON.pm line 54

Re: bizarre error "panic" with Devel::DProf
by Khen1950fx (Canon) on May 31, 2009 at 02:34 UTC
    It is actually not that bizarre. If you look under the BUGS section of Devel::DProf, you'll find that author has listed a warning that if a subroutine "exits with a goto(LABEL), last(LABEL), or next(LABEL) then perl may crash or Devel::DProf may die with the error" that you got.
Re: bizarre error "panic" with Devel::DProf
by aufflick (Deacon) on Jun 01, 2009 at 01:23 UTC
    I also suggest you try out the amazing Devel::NYTProf. Not only is it more stable than Devel::Prof, it generates incredible reports in html, csv, etc. See this blog post by Tim Bunce with example screen shots.