Marty O'Brien > Devel-Trace-Fork-0.11 > Devel::Trace::Fork::Stderr

Download:
Devel-Trace-Fork-0.11.tar.gz

Annotate this POD

View/Report Bugs
Source  

NAME ^

Devel::Trace::Fork::Stderr - Variant of Devel::Trace::Fork that outputs to standard error

VERSION ^

0.11

SYNOPSIS ^

    perl -d:Trace::Fork::Stderr program

DESCRIPTION ^

Like Mark Jason Dominus's Devel::Trace module, but debugging output includes additional information like

This additional information 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 be a file that looks something like:

    /usr/bin/perl test
    1268025451 1268025451.815
    >>    0.816214:7996:0:test:1: if (fork() == 0) {
    >>    0.826566:7996:0:test:5: print "This is the parent.\n";
    >>    0.826684:9572:0:test:2:     print "This is the child.\n";
    >>    0.826941:9572:0:test:3:     exit 0;

DETAILS ^

Like Devel::Trace, debugging output is printed to STDERR. To redirect debugging output to a separate file, see Devel::Trace::Fork.

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.

SUBROUTINES/METHODS ^

None

DEPENDENCIES ^

    Devel::Trace

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.

SEE ALSO ^

Devel::Trace, Devel::Trace::More, Devel::Trace::Fork

AUTHOR ^

Marty O'Brien, <mob@cpan.org>

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.

syntax highlighting: