NAME
Devel::Trace::Fork - Devel::Trace-like output for multi-process programs
SYNOPSIS
perl -d:Trace::Fork program
DESCRIPTION
Like Mark Jason Dominus's Devel::Trace module, but debugging output includes the process id of the process that executes each statement. This can be helpful for debugging programs that make use of the fork system call to run. For example, the Trace::Fork output of this program:
if (fork() == 0) {
print "This is the child.\n";
exit 0;
}
print "This is the parent.\n";
will look something like:
>> 5240:./test:1: if (fork() == 0) {
>> 5240:./test:5: print "This is the parent.\n";
This is the parent.
>> 8188:./test:2: print "This is the child.\n";
This is the child.
>> 8188:./test:4: exit 0;
DETAILS
See Devel::Trace. Use the $Devel::Trace::TRACE variable or the Devel::Trace::trace function exactly the way you would use them with the pure Devel::Trace module. To import the Devel::Trace::trace function into your program's namespace, include the line:
use Devel::Trace 'trace';
somewhere in your program.
SEE ALSO
Devel::Trace, Devel::Trace::More
AUTHOR
Marty O'Brien, <mob@cpan.org>
COPYRIGHT
Copyright (c) 2010, Marty O'Brien
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.0 or, at your option, any later version of Perl 5 you may have available.