The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Enbugger::Restarts - Reach around in your stack and restart execution from arbitrary places

SYNOPSIS

Here's a quick example of redefining a function you're currently in, then restarting execution from the start.

    Loading DB routines from perl5db.pl version 1.3
    Editor support available.
    
    Enter h or `h h' for help, or `man perldebug' for more help.
    
    main::foo(blarg:2): foo()
      DB<1> sub foo { print "Hello world!\n" } # new version
    
      DB<2> rat 1
    
      DB<3> c
    Hello world!

DESCRIPTION

I'm trying to get a little of Smalltalk's debugger features for Perl 5. The standard Perl debuggers all let you redefine functions including functions that are currently executing. This extension allows you to restart execution at the beginning of whatever is currently at some point on your call stack.

The below functions describe a call stack:

  two();
  sub two { three() }
  sub three { five() }
  sub five { seven() }
  sub seven { ... }


  main
      -> two
          -> three
              -> five
                  ->seven
                  <-
              <- five
          <- three
      <- two
  <- main

The restart_at extension lets you restart a particular level:

  sub seven { DB::restart_at(3) if $not_restarted++ }

  main
      -> two
          -> three
              -> five
                  ->seven
                      restart_at( 3 )
          -> three
              -> five
                  -> seven
                  <-
              <- five
          <- three
      <- two
  <- main

DEBUGGER INTEGRATION

perl5db - the default debugger

rat(N) - restart at N

Restarts the function at caller(N) level.

INSTALLATION

To install this module, run the following commands:

    perl Makefile.PL
    make
    make test
    make install

DEPENDENCIES

A C compiler.
Enbugger

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the perldoc command.

    perldoc Enbugger::Restarts

You can also look for information at:

RT, CPAN's request tracker http://rt.cpan.org/NoAuth/Bugs.html?Dist=Enbugger-Restarts
AnnoCPAN, Annotated CPAN documentation http://annocpan.org/dist/Enbugger-Restarts
CPAN Ratings http://cpanratings.perl.org/d/Enbugger-Restarts
Search CPAN http://search.cpan.org/dist/Enbugger-Restarts

AUTHOR

Josh ben Jore >jjore@cpan.org<

COPYRIGHT AND LICENCE

Copyright (C) 2008 WhitePages.com, Inc. with primary development by Joshua ben Jore.

This program is distributed WITHOUT ANY WARRANTY, including but not limited to the implied warranties of merchantability or fitness for a particular purpose.

The program is free software. You may distribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation (either version 2 or any later version) and the Perl Artistic License as published by O’Reilly Media, Inc. Please open the files named gpl-2.0.txt and Artistic for a copy of these licenses.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 166:

Non-ASCII character seen before =encoding in 'O’Reilly'. Assuming UTF-8