« blib/lib/Devel/Trepan/CmdProcessor/Command/Show_Subcmd/Highlight.pm
↑ Summary
lib/Devel/Trepan/CmdProcessor/Command/Action.pm »
| 1 | # Copyright (C) 2011-2014 Rocky Bernstein <rocky@cpan.org> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 13 | ▶ | use warnings; use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 13 | ▶ | use Class::Struct; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 13 | ▶ | no strict 'subs'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 13 | struct Devel::Trepan::Position => {pkg => '$', filename => '$', line => '$', | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | event => '$'}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 13 | ▶ | use strict 'subs'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | package Devel::Trepan::Position; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | sub eq($$) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 2 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
eq: called CC=5 SCAR=25.5
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 0 | ▶ | my ($self, $other) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
eq: not called CC=5 SCAR=25.5
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 0 | ▶ | return 0 unless defined $self && defined $other; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition16%1/6
defined $self and defined $other
defined $self and defined $other
MC/DC0%0/2
defined $self and defined $other
defined $self
defined $other
MC/DC0%0/2
defined $self and defined $other
defined $self
defined $other
Truth table33%1/3
A and B
A= defined $selfB= defined $other
Truth table0%0/3
A and B
A= defined $selfB= defined $other
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | return ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 0 | ▶ | $self->filename eq $other->filename | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%4/12
$self->filename eq $other->filename && $self->line eq $other->line && $self->event eq $other->event
$self->filename eq $other->filename and $self->line eq $other->line
$self->filename eq $other->filename && $self->line eq $other->line && $self->event eq $other->event
$self->filename eq $other->filename and $self->line eq $other->line
MC/DC33%1/3
$self->filename eq $other->filename && $self->line eq $other->line && $self->event eq $other->event
$self->filename eq $other->filename
$self->line eq $other->line
$self->event eq $other->event
MC/DC0%0/3
$self->filename eq $other->filename && $self->line eq $other->line && $self->event eq $other->event
$self->filename eq $other->filename
$self->line eq $other->line
$self->event eq $other->event
Truth table50%2/4
A and B && C
A= $self->filename eq $other->filenameB= $self->line eq $other->lineC= $self->event eq $other->event
Truth table0%0/4
A and B && C
A= $self->filename eq $other->filenameB= $self->line eq $other->lineC= $self->event eq $other->event
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | && $self->line eq $other->line | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | && $self->event eq $other->event) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 0 | ▶ | sub inspect($) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
inspect: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
inspect: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 0 | return sprintf("pkg: %s, file: %s, line: %s, event: %s", | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | $self->pkg, $self->filename, $self->line, $self->event); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 13 | ▶ | unless (caller) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 0 | my $line = __LINE__; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 0 | my $pos1 = __PACKAGE__->new(pkg=>__PACKAGE__, filename=>__FILE__, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | line => $line, event=>'brkpt'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | 0 | my $pos2 = __PACKAGE__->new(pkg=>__PACKAGE__, filename=>__FILE__, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | line => $line, event=>'brkpt'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 0 | my $pos3 = __PACKAGE__->new(pkg=>__PACKAGE__, filename=>__FILE__, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | line => __LINE__, event=>'brkpt'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 0 | ▶ | printf "pos1 is%s pos2\n", $pos1->eq($pos2) ? '' : ' not'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | 0 | ▶ | printf "pos1 is%s pos3\n", $pos1->eq($pos3) ? '' : ' not'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | 0 | print $pos1->inspect, "\n"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 13 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||