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}
In reply to Re: locating specific function calls
by shmem
in thread locating specific function calls
by markov
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |