in reply to Monkey patching all subs with a basic 'starting subname' message
I would like to log the start/end of each method call
So, you are trying to implement a poor man's Devel::NYTProf. Well, you could re-implement what Devel::NYTProf does, starting with its interface to the perl interpreter. Hint: Use the debugger and compiler interfaces (DB, O, B). Plan some months of work.
Or, you could simply install Devel::NYTProf and use it. With all of its fancy statistics, timing information, reporting. Plan 5 to 15 min for installation and another 5 to 15 min to learn how to use it.
Any other wisdom to be shared here (bar the obvious "don't" and "use a cpan module")?
Oh sorry, forget that Devel::NYTProf thing. Have fun doing it the hard and ugly way. Ignore that CPAN exists. And while you start doing everything from scratch, why don't you re-invent perl? You could use your own compiler for own C variant, running your own assembler and of course, your own operating system.
CPAN is Perl's strength, not its weakness.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Monkey patching all subs with a basic 'starting subname' message
by Anonymous Monk on Jul 14, 2017 at 18:38 UTC | |
by Your Mother (Archbishop) on Jul 14, 2017 at 21:49 UTC | |
by Anonymous Monk on Jul 17, 2017 at 20:38 UTC |