Devel-Trace-Fork
view release on metacpan or search on metacpan
lib/Devel/Trace/Fork.pm view on Meta::CPAN
Debug output is not to C<STDERR>, but to a file that is either
specified by C<$ENV{DTRACE_FILE}> or set to the file name
C<"DTFork.$$"> in the current directory (where C<$$> is the
process identifier of the parent process). To output debugging
output to C<STDERR> the way L<Devel::Trace> does, see
L<Devel::Trace::Fork::Stderr>.
See L<Devel::Trace>. Use the C<$Devel::Trace::TRACE> variable
or the C<Devel::Trace::trace> function exactly the way you
would use them with the pure C<Devel::Trace> module. To import
the C<Devel::Trace::trace> function into your program's
namespace, include the line:
use Devel::Trace 'trace';
somewhere in your program.
=head1 SUBROUTINES/METHODS
None
=head1 DIAGNOSTICS
=over 4
=item C<Devel::Trace::Fork: failed to ...>
An I/O error occurred with the trace output file. Check
that you have permission to create or overwrite the file
specified by the C<DTRACE_FILE> environment variable,
or if C<DTRACE_FILE> is not specified, that you can create
files in the current directory.
=back
=head1 CONFIGURATION AND ENVIRONMENT
=over 4
=item C<$ENV{DTRACE_FILE}>
Name of trace output file. If not specified, uses the filename
C<"DTFork.$$"> in the current directory.
=item C<$ENV{DTFORK_ERASE_ON_GOOD_EXIT}>
If this variable is non-zero, and the program is successful
(that is, it is exiting with status 0), then the output trace
file will be removed. This setting is helpful if you are
trying to replicate an intermittent program failure and don't
want your directory littered with the trace files of
successful runs.
=back
=head1 DEPENDENCIES
Devel::Trace
=head1 BUGS AND LIMITATIONS
If there are child processes that exit later than the
parent process, then the final output will not be sorted.
There is almost enough information in the trace output
to use it for profiling. Almost.
=head1 SEE ALSO
L<Devel::Trace>, L<Devel::Trace::More>
=head1 AUTHOR
Marty O'Brien, E<lt>mob@cpan.orgE<gt>
=head1 LICENSE AND 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.
=cut
( run in 3.341 seconds using v1.01-cache-2.11-cpan-364913b4093 )