in reply to locating specific function calls
I am looking for a way to run all occurrences of a certain function in a file.
I don't get what you are up to. Run the file, and all ocurrences of the function will eventually been run... what is your __x() function about?
Maybe you are looking for a way to wrap functions?
if ($debug) { my $sub = \&some_function; my $wrapsub = sub { __x(@_); $sub->(@_) }; *some_function = $wrapsub; }
Then, whenever some_function() is invoked, your __x() is called first.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: locating specific function calls
by markov (Scribe) on Apr 11, 2007 at 13:31 UTC |