Rob Hanson wrote:
> If you call your debug() function right before a return statement
> it is possible that optimizations by the Perl compiler can optimize the
> calling info away.
can you give an example to demonstrate this affect?
david
--
sub'_{print"@_ ";* \ = * __ ,\ & \}
sub'__{print"@_
imilar I
was going nuts trying to figure out why caller wasn't returning what it
should.
Rob
-Original Message-
From: Gary Stainburn [mailto:[EMAIL PROTECTED]
Sent: Monday, January 19, 2004 8:09 AM
To: [EMAIL PROTECTED]
Subject: name of calling function
Hi folks,
In the back of my mi
On Monday 19 Jan 2004 1:09 pm, Gary Stainburn wrote:
> 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
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 ob