On Sat, Nov 6, 2010 at 11:59 AM, Matt Sergeant <matt@...> wrote:
> On Sat, 6 Nov 2010, Matt Sergeant wrote:
>
>> Any idea how to start the internal perl in debug mode and enable NYTProf?
>
> OK, so I figured this out for myself...
>
> First modify your app so that somewhere on startup it has:
>
> DB::enable_profile() if $INC{'Devel/NYTProf.pm'};
>
> I put mine in my windowDidLoad() routine.
>
> Then make sure an onQuit() handler has:
>
> DB::finish_profile() if $INC{'Devel/NYTProf.pm'};
>
> Then compile your app, and start it on the command line from it's
> directory as follows:
>
> (this is in my DVDSpanner.app dir:)
>
> DVDSpanner.app/Contents$ PERL5OPT=-d:NYTProf NYTPROF=start=no \
> MacOS/DVDSpanner
Good to know! I'll write this up into a proper documentation page -
with appropriate credit of course. :-)
sherm--
--
Cocoa programming in Perl:
http://camelbones.sourceforge.net
|