I recently started to dabble with "perl", and soon discovered I couldn't easily get a trace of execution, similar to the -x option in bash or sh. So I went searching the web, and found something called Devel::Trace created by Mark-Jason Dominus. I found an open-source for this code, but it wasn't clear to me about how to "implement" it. So I made a leap-of-faith, and tried something, and it WORKED! I've packaged it in my "Devel-Trace-0.12.tgz" file, and it is downloadable from the end of this page. There are only three components:
1. demo.pl which is a perl script that initially helps you find where to put the Trace.pm module. Once installed, it shows you how Trace works.
2. README.txt which is Mark's original documentation, along with "Install" instructions I added before the Author credits. You'll need to read this carefully.
3. Trace.pm which is the actual Trace logic written by Mark-Jason Dominus. You'll copy this module according the README instructions.
That's basically all there's to it. I've found this Trace code works on perl v5 (and above). Both my Leopard and Snow Leopard systems have perl v5.
SPECIAL NOTE: when you click the download-image, click the download-icon on the right that look like a downward-pointing arrow in a pan ([ turned sideways, under the arrow).