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.102'; # TRIAL |
4
|
4
|
|
|
4
|
|
23
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
100
|
|
5
|
4
|
|
|
4
|
|
19
|
use warnings; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
535
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new { |
8
|
20
|
|
|
20
|
0
|
35
|
my $class = shift; |
9
|
|
|
|
|
|
|
|
10
|
20
|
|
|
|
|
33
|
my $self = { |
11
|
|
|
|
|
|
|
}; |
12
|
20
|
|
|
|
|
36
|
bless $self, $class; |
13
|
|
|
|
|
|
|
|
14
|
20
|
|
|
|
|
49
|
return $self; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub filter { |
18
|
20
|
|
|
20
|
0
|
32
|
my $self = shift; |
19
|
20
|
|
|
|
|
28
|
my $lines_ref = shift; |
20
|
|
|
|
|
|
|
|
21
|
20
|
|
|
|
|
25
|
my @no_whitespace; |
22
|
|
|
|
|
|
|
|
23
|
20
|
|
|
|
|
28
|
foreach my $row (@{$lines_ref}) { |
|
20
|
|
|
|
|
39
|
|
24
|
317
|
|
|
|
|
1747
|
$row =~ s/\s*//g; |
25
|
317
|
100
|
|
|
|
551
|
next if ($row eq ''); |
26
|
260
|
|
|
|
|
426
|
push @no_whitespace, $row; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
20
|
|
|
|
|
99
|
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.102 |
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 |