Shlomi Fish > Devel-LineTrace-0.1.6 > Devel::LineTrace

Download:
Devel-LineTrace-0.1.6.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.1.6   Source  

NAME ^

Devel::LineTrace - Apply traces to individual lines.

SYNPOSIS ^

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

DESCRIPTION ^

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 ^

Devel::Trace, Debug::Trace

AUTHORS ^

Shlomi Fish <shlomif@vipe.technion.ac.il>