Devel::LineTrace - Apply traces to individual lines.


Devel-LineTrace documentation  | view source Contained in the Devel-LineTrace distribution.

Index


NAME

Top

Devel::LineTrace - Apply traces to individual lines.

SYNPOSIS

Top

    perl -d:LineTrace myscript.pl [args ...]

DESCRIPTION

Top

This is a class that enables assigning Perl code callbacks to certain lines in the original code without modifying it.

To do so prepare a file with the following syntax:

    [source_filename]:[line]
        [CODE]
        [CODE]
        [CODE]
    [source_filename]:[line]
        [CODE]
        [CODE]
        [CODE]

Which will assign the [CODE] blocks to the filename and line combinations. The [CODE] sections are indented from the main blocks. To temporarily cancel a callback put a pound-sign (#) right at the start of the line (without whitespace beforehand).

The location of the file should be specified by the PERL5DB_LT environment variable (or else it defaults to perl-line-traces.txt.)

Then invoke the perl interpreter like this:

    perl -d:LineTrace myprogram.pl

SEE ALSO

Top

Devel::Trace, Debug::Trace

COPYRIGHT & LICENSE

Top

AUTHORS

Top

Shlomi Fish ( http://www.shlomifish.org/ ).


Devel-LineTrace documentation  | view source Contained in the Devel-LineTrace distribution.