Perl/Analysis/Static/Filter/NameLike.pm untested

filter: Statementstmt 0.0% 0 / 12 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 19 CC 2 SCAR 13.9
CC
2
Cov
0%
_filter
6.0
_set_arguments
2.0
BEGIN
2.0
CRAP 4.0
1 package Perl::Analysis::Static::Filter::NameLike;
2 {
3 $Perl::Analysis::Static::Filter::NameLike::VERSION = '0.004'; # TRIAL
4 }
5 # ABSTRACT: Does the name match this regex?
6  
7 use Moose;
8  
9 extends 'Perl::Analysis::Static::Filter';
10  
11 has 'name' => ( is => 'rw', isa => 'Str' );
12  
13 sub _filter {
14 my ($self, $element) = @_;
15
16 return 1 if $element->name() =~ $self->name();
17 }
18  
19 sub _set_arguments {
20 my ($self, $arguments) = @_;
21  
22 $self->name($arguments->[0]);
23 }
24  
25 1;
26  
27 __END__