| 1 | # -*- coding: utf-8 -*- | ||||||||||
| 2 | # Copyright (C) 2011-2012, 2014 Rocky Bernstein <rocky@cpan.org> | ||||||||||
| 3 | 12 | ▶ | use warnings; no warnings 'redefine'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 12 | ▶ | use rlib '../../../..'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | package Devel::Trepan::CmdProcessor::Command::TBreak; | ||||||||||
| 8 | |||||||||||
| 9 | 12 | ▶ | use if !@ISA, Devel::Trepan::CmdProcessor::Command ; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 12 | ▶ | unless (@ISA) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 12 | 12 | ▶ | eval <<'EOE'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | use constant CATEGORY => 'breakpoints'; | ||||||||||
| 14 | use constant SHORT_HELP => 'Set a one-time breakpoint'; | ||||||||||
| 15 | use constant MIN_ARGS => 0; # Need at least this many | ||||||||||
| 16 | use constant MAX_ARGS => undef; # Need at most this many - undef -> unlimited. | ||||||||||
| 17 | use constant NEED_STACK => 1; | ||||||||||
| 18 | EOE | ||||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 12 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 22 | 12 | ▶ | use vars qw(@ISA); @ISA = @CMD_ISA; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 23 | 12 | ▶ | use vars @CMD_VARS; # Value inherited from parent | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 24 | |||||||||||
| 25 | 12 | our $NAME = set_name(); | |||||||||
| 26 | =pod | ||||||||||
| 27 | |||||||||||
| 28 | =head2 Synopsis: | ||||||||||
| 29 | |||||||||||
| 30 | =cut | ||||||||||
| 31 | 12 | our $HELP = <<'HELP'; | |||||||||
| 32 | =pod | ||||||||||
| 33 | |||||||||||
| 34 | B<tbreak> [I<location>] | ||||||||||
| 35 | |||||||||||
| 36 | Set a one-time breakpoint. The breakpoint is removed after it is hit. | ||||||||||
| 37 | If no location is given use the current stopping point. | ||||||||||
| 38 | |||||||||||
| 39 | =head2 Examples: | ||||||||||
| 40 | |||||||||||
| 41 | tbreak | ||||||||||
| 42 | tbreak 10 # set breakpoint on line 10 | ||||||||||
| 43 | |||||||||||
| 44 | When a breakpoint is hit the event icon is C<x1>. | ||||||||||
| 45 | |||||||||||
| 46 | =head2 See also: | ||||||||||
| 47 | |||||||||||
| 48 | L<C<break>|Devel::Trepan::CmdProcessor::Break> and | ||||||||||
| 49 | C<help breakpoints>. | ||||||||||
| 50 | |||||||||||
| 51 | =cut | ||||||||||
| 52 | HELP | ||||||||||
| 53 | |||||||||||
| 54 | # This method runs the command | ||||||||||
| 55 | 0 | ▶ | sub run($$) { | ||||||||
|
Subroutine
run: not called CC=1 SCAR=0.1
Subroutine
run: not called CC=1 SCAR=0.1
Pod
undocumented
Pod
undocumented
| |||||||||||
| 56 | 0 | my ($self, $args) = @_; | |||||||||
| 57 | 12 | ▶ | no warnings 'once'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 58 | 0 | $self->{dbgr}->set_tbreak($DB::filename, $args->[1]); | |||||||||
| 59 | } | ||||||||||
| 60 | |||||||||||
| 61 | 1 | ▶ | unless (caller) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 62 | # require_relative '../mock' | ||||||||||
| 63 | # dbgr, cmd = MockDebugger::setup | ||||||||||
| 64 | # p cmd.run([cmd.name]) | ||||||||||
| 65 | } | ||||||||||
| 66 | |||||||||||
| 67 | 1 | 1; | |||||||||