D
Daniel Pfeiffer
Hi,
with "caller" I can pinpoint where something comes from. Question is how can
I get at that same information _without_ calling the function?
Usage is in the "make" improvement makepp.sf.net, where a rule action can be a
self defined function as in
sub c_mycommand { ... } # c_ marks this as a command
targets: dependencies
&mycommand args
Now that function might be defined in the same makefile, in an include file,
or in a module which gets use`d. (In the first two cases it goes through an
eval with a #line nnn "file" directive so perl knows where it came from.)
Since makepp tries very hard to guarantee correct builds, it makes this
function an implicit dependency. But currently that dependency is the
makefile -- which is wrong if it came from include or use.
I hope there is an easier way than traversing %:: and hunting for a function
of the same name!
thanks in advance!
Daniel
with "caller" I can pinpoint where something comes from. Question is how can
I get at that same information _without_ calling the function?
Usage is in the "make" improvement makepp.sf.net, where a rule action can be a
self defined function as in
sub c_mycommand { ... } # c_ marks this as a command
targets: dependencies
&mycommand args
Now that function might be defined in the same makefile, in an include file,
or in a module which gets use`d. (In the first two cases it goes through an
eval with a #line nnn "file" directive so perl knows where it came from.)
Since makepp tries very hard to guarantee correct builds, it makes this
function an implicit dependency. But currently that dependency is the
makefile -- which is wrong if it came from include or use.
I hope there is an easier way than traversing %:: and hunting for a function
of the same name!
thanks in advance!
Daniel