line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package School::Code::Compare::Charset::NoWhitespace; |
2
|
|
|
|
|
|
|
# ABSTRACT: trim whitespace since it's mostly irrelevant |
3
|
|
|
|
|
|
|
$School::Code::Compare::Charset::NoWhitespace::VERSION = '0.104'; |
4
|
4
|
|
|
4
|
|
25
|
use strict; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
118
|
|
5
|
4
|
|
|
4
|
|
22
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
683
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new { |
8
|
20
|
|
|
20
|
0
|
56
|
my $class = shift; |
9
|
|
|
|
|
|
|
|
10
|
20
|
|
|
|
|
38
|
my $self = { |
11
|
|
|
|
|
|
|
}; |
12
|
20
|
|
|
|
|
39
|
bless $self, $class; |
13
|
|
|
|
|
|
|
|
14
|
20
|
|
|
|
|
66
|
return $self; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub filter { |
18
|
20
|
|
|
20
|
0
|
34
|
my $self = shift; |
19
|
20
|
|
|
|
|
34
|
my $lines_ref = shift; |
20
|
|
|
|
|
|
|
|
21
|
20
|
|
|
|
|
34
|
my @no_whitespace; |
22
|
|
|
|
|
|
|
|
23
|
20
|
|
|
|
|
29
|
foreach my $row (@{$lines_ref}) { |
|
20
|
|
|
|
|
52
|
|
24
|
317
|
|
|
|
|
2021
|
$row =~ s/\s*//g; |
25
|
317
|
100
|
|
|
|
685
|
next if ($row eq ''); |
26
|
260
|
|
|
|
|
529
|
push @no_whitespace, $row; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
20
|
|
|
|
|
111
|
return \@no_whitespace; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=pod |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=encoding UTF-8 |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 NAME |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
School::Code::Compare::Charset::NoWhitespace - trim whitespace since it's mostly irrelevant |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 VERSION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
version 0.104 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 AUTHOR |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Boris Däppen <bdaeppen.perl@gmail.com> |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
This software is copyright (c) 2020 by Boris Däppen. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
57
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut |