=head1 NAME

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

=head1 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!





=head1 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 C<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

=head1 DEBUGGER INTEGRATION

=head2 perl5db - the default debugger

=over

=item rat(N) - restart at N

Restarts the function at caller(N) level.

=back







=head1 INSTALLATION

To install this module, run the following commands:

    perl Makefile.PL
    make
    make test
    make install





=head1 DEPENDENCIES

=over

=item A C compiler.

=item Enbugger

=back






=head1 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:

=over

=item RT, CPAN's request tracker L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Enbugger-Restarts>

=item AnnoCPAN, Annotated CPAN documentation L<http://annocpan.org/dist/Enbugger-Restarts>

=item CPAN Ratings L<http://cpanratings.perl.org/d/Enbugger-Restarts>

=item Search CPAN L<http://search.cpan.org/dist/Enbugger-Restarts>

=back





=head1 AUTHOR

Josh ben Jore E<gt>jjore@cpan.orgE<lt>





=head1 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.

=begin emacs

## Local Variables:
## mode: pod
## mode: auto-fill
## End:

=end emacs
