| 1 | package App::Ack::Filter::IsPath; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | App::Ack::Filter::IsPath | ||
| 6 | |||
| 7 | =head1 DESCRIPTION | ||
| 8 | |||
| 9 | Filters based on path. | ||
| 10 | |||
| 11 | =cut | ||
| 12 | |||
| 13 | 582 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 582 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | 582 | ▶ | use parent 'App::Ack::Filter'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | |||
| 17 | 582 | ▶ | use App::Ack::Filter::IsPathGroup (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | |||
| 19 | 10892 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 20 | 10892 | my ( $class, $filename ) = @_; | |
| 21 | |||
| 22 | 10892 | return bless { | |
| 23 | filename => $filename, | ||
| 24 | groupname => 'IsPathGroup', | ||
| 25 | }, $class; | ||
| 26 | } | ||
| 27 | |||
| 28 | 404 | ▶ | sub create_group { |
|
Subroutine
create_group: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 29 | 404 | return App::Ack::Filter::IsPathGroup->new(); | |
| 30 | } | ||
| 31 | |||
| 32 | 0 | ▶ | sub filter { |
|
Subroutine
filter: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 33 | 0 | my ( $self, $file ) = @_; | |
| 34 | |||
| 35 | 0 | return $file->name eq $self->{filename}; | |
| 36 | } | ||
| 37 | |||
| 38 | 0 | ▶ | sub inspect { |
|
Subroutine
inspect: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 39 | 0 | my ( $self ) = @_; | |
| 40 | |||
| 41 | 0 | return ref($self) . ' - ' . $self->{filename}; | |
| 42 | } | ||
| 43 | |||
| 44 | 0 | ▶ | sub to_string { |
|
Subroutine
to_string: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 45 | 0 | my ( $self ) = @_; | |
| 46 | |||
| 47 | 0 | return $self->{filename}; | |
| 48 | } | ||
| 49 | |||
| 50 | 582 | 1; | |