The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Carp::REPL - read-eval-print-loop on die

VERSION

Version 0.03

SYNOPSIS

The intended way to use this module is through the command line.

    perl tps-report.pl
        Can't call method "cover_sheet" without a package or object reference at tps-report.pl line 6019.

    perl -MCarp::REPL tps-report.pl
        Can't call method "cover_sheet" without a package or object reference at tps-report.pl line 6019.

        $ map {"\n"} $form, $subform
        27B/6
        Report::TPS::Subreport=HASH(0x86da61c)

FUNCTIONS

repl

This module's interface consists of exactly one function: repl. This is provided so you may install your own $SIG{__DIE__} handler if you have no alternatives.

It takes the same arguments as die, and returns no useful value. In fact, don't even depend on it returning at all!

One useful place for calling this manually is if you just want to check the state of things without having to throw a fake error.

    use Carp::REPL;

    sub involved_calculation
    {
        # ...
        Carp::REPL::repl;
        # ...
    }

COMMANDS

Note that this is not supposed to be a full-fledged debugger. A few commands are provided to aid you in finding out what went awry. See Devel::ebug if you're looking for a serious debugger.

  • :up

    Moves one frame up in the stack.

  • :down

    Moves one frame down in the stack.

SEE ALSO

Devel::REPL, Devel::ebug

AUTHOR

Shawn M Moore, <sartak at gmail.com>

BUGS

Please report any bugs or feature requests to bug-carp-repl at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Carp-REPL. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Carp::REPL

You can also look for information at:

ACKNOWLEDGEMENTS

Thanks to Nelson Elhage and Jesse Vincent for the idea.

COPYRIGHT & LICENSE

Copyright 2007 Shawn M Moore, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.