in reply to Re: Errors when using DProf to profile
in thread Errors when using DProf to profile

OK, thanks. So I guess if a subroutine doesn't explicitly return a value, would that cause dprof to give an error?

I'll try Devel::SmallProf to see what happens. I just tried dprof, since it was recommended in PBP.

-- Burvil

  • Comment on Re^2: Errors when using DProf to profile

Replies are listed 'Best First'.
Re^3: Errors when using DProf to profile
by BrowserUk (Patriarch) on Mar 29, 2006 at 17:26 UTC
    So I guess if a subroutine doesn't explicitly return a value, would that cause dprof to give an error?

    No it shouldn't. Dprof operates at a level that will see the subroutine return regardless of whether it uses an explicit return statement or not.

    The thing about the goto trick is that the subroutine never returns at all, which Dprof rightly warns as being unusual, althought the goto trick is a specially architected feature of Perl. I guess it would be nice if it could detect the goto and so not report it, but I would imagine that detecting it would be quite difficult to do.

    The chances are that you could just ignore the warnings and the results from dprofpp would be perfectly usable.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.