Hi folks,
In the back of my mind I seem to think that you can find out where a function
was called from. What I'm after is:
my %_DEBUG={'new'=>1,'load_file'=>0};
sub debug {
my $caller=????????????
return (defined $_DEBUG{$caller} ? $_DEBUG{$caller} : 0;
}
sub new { # create new track object
print "calling Trainset::Track::new\n" if &debug;
....
}
Is this possible?
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>