November 09, 2009

Trivial tips: debugging Perl, fortune

[на български]

Just two tips that I'm writing down here so I can find them later :)

If you are debugging Perl programs, and the debugger insists on stopping every now and then with a "100 levels deep in subroutine calls!", and you know that this is actually legitimate for your application (e.g. there is a recursive invocation of a free/dispose function on a graph containing many objects), just set the $DB::deep variable to a large enough value, as documented in the "Guts of Perl Debugging" page (perldoc perldebguts).

If you're like me, and have a fortune invocation in your interactive shell's startup file, and sometimes you log in, you notice a fortune come up, but then you very quickly start another program and then decide that the fortune was really interesting and wouldn't you have wanted to read it, then fortune's -m pattern command-line argument ought to help.

Posted by roam at 01:38 PM | Comments (0)
Valid XHTML 1.0!   Valid CSS!