File Coverage

blib/lib/School/Code/Compare/Charset/Signes.pm
Criterion Covered Total %
statement 19 19 100.0
branch 1 2 50.0
condition n/a
subroutine 4 4 100.0
pod 0 2 0.0
total 24 27 88.8


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