Benjamin Schieder

[TECH] SIMPLE PERL STACKTRACE

2011 May 27

How to easily get a Perl stack trace? Like this:

my $i = 1;
print "Stack Trace:\\n";
while ( (my @call_details = (caller($i++))) ){
print $call_details[1].":".$call_details[2]." in function ".$call_details[3]."\\n";
}



EOF

Category: blog

Tags: Tech