DB-Hooks
view release on metacpan or search on metacpan
lib/DB/Hooks.pm view on Meta::CPAN
my $dbg = DB::new; # Create RT debugger
$DB::instance++;
# NOTICE: Circular reference is here.
# The debugger instance exists until main script is terminated
DB::state( debugger => $dbg ); # Make debugger instance accessable via state
#TODO? Probably we want apply options as soon as possible, but keep an eye to
# DB::instance, because we may apply them to a wrong instance.
apply_options();
# TODO: Because RT and CT options are differ on command line
# We may leave CT debugger alive for history reasons
# Delete CT debugger
push @DB::state, shift @DB::state; # Swap RT and CT debuggers
DB::state( debugger => undef );
$DB::instance--;
no strict 'refs'; no warnings 'redefine';
*{ "DB::on" } = \&{ "DB::RT_on" };
*{ "DB::unsubscribe" } = \&{ "DB::RT_unsubscribe" };
( run in 1.406 second using v1.01-cache-2.11-cpan-14f38c9f855 )