| 1 | package Pipe::Tube::Uniq; | ||||||||||||||||||||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use 5.006; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use base 'Pipe::Tube'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 1 | our $VERSION = '0.06'; | |||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 28 | ▶ | sub run { | ||||||||||||||||||||||||||
|
Subroutine
run: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 11 | 28 | my ($self, @input) = @_; | |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 28 | my @result; | |||||||||||||||||||||||||||
| 14 | 28 | foreach my $v (@input) { | |||||||||||||||||||||||||||
| 15 | 24 | ▶ | next if defined $self->{last} and $self->{last} eq $v; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
defined $self->{"last"} and $self->{"last"} eq $v
MC/DC100%2/2
defined $self->{"last"} and $self->{"last"} eq $v
defined $self->{"last"}
$self->{"last"} eq $v
Truth table100%3/3
A and B
A= defined $self->{"last"}B= $self->{"last"} eq $v
| |||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | 10 | $self->{last} = $v; | |||||||||||||||||||||||||||
| 18 | 10 | push @result, $v; | |||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||
| 20 | 28 | return @result; | |||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 1 | 1; | |||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||