line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Table::Wave; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
79367
|
use warnings; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
87
|
|
4
|
3
|
|
|
3
|
|
14
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
133
|
|
5
|
3
|
|
|
3
|
|
14
|
use Carp; |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
991
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
2
|
|
|
2
|
1
|
518
|
my $class = shift; |
11
|
2
|
|
|
|
|
6
|
my $self = {}; |
12
|
2
|
|
|
|
|
6
|
bless $self, $class; |
13
|
2
|
|
|
|
|
8
|
return $self; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub wave { |
17
|
6
|
|
|
6
|
1
|
627
|
my $self = shift; |
18
|
6
|
100
|
|
|
|
29
|
@{$self->{last}} = (('') x $#_) unless defined $self->{last}; |
|
1
|
|
|
|
|
5
|
|
19
|
|
|
|
|
|
|
|
20
|
6
|
|
|
|
|
14
|
my @this = @_; |
21
|
6
|
|
|
|
|
9
|
my @last = @{$self->{last}}; |
|
6
|
|
|
|
|
16
|
|
22
|
|
|
|
|
|
|
|
23
|
6
|
100
|
|
|
|
23
|
$this[0]='' if $this[0] eq $last[0]; |
24
|
6
|
|
|
|
|
15
|
for ( 1..$#_ ) { |
25
|
18
|
|
50
|
|
|
41
|
$this[$_] ||= ''; |
26
|
18
|
|
100
|
|
|
41
|
$last[$_] ||= ''; |
27
|
18
|
100
|
100
|
|
|
77
|
$this[$_]='' if $this[$_] eq $last[$_] && !$this[$_-1]; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
6
|
|
|
|
|
13
|
@{$self->{last}} = @_; |
|
6
|
|
|
|
|
16
|
|
31
|
|
|
|
|
|
|
|
32
|
6
|
|
|
|
|
53
|
return @this; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |