Perl Diver 2.33
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

App::Ack::Filter

Name App::Ack::Filter
Version
Located at /usr/share/perl5
File /usr/share/perl5/App/Ack/Filter.pm
Is Core No
Search CPAN for this module App::Ack::Filter
Documentation App::Ack::Filter
Module Details App::Ack::Filter

NAME

App::Ack::Filter - Filter objects to filter files


DESCRIPTION

An abstract superclass that represents objects that can filter App::Ack::File objects. App::Ack::Filter implementations are responsible for filtering filenames to be searched.


SYNOPSIS

    # filter implementation
    package MyFilter;
    use strict;
    use warnings;
    use parent 'App::Ack::Filter';
    sub filter {
        my ( $self, $file ) = @_;
    }
    BEGIN {
        App::Ack::Filter->register_filter('mine' => __PACKAGE__);
    }
    1;
    # users
    App::Ack::Filter->create_filter('mine', @args);


METHODS

App::Ack::Filter->create_filter($type, @args)

Creates a filter implementation, registered as $type. @args are provided as additional arguments to the implementation's constructor.

App::Ack::Filter->register_filter($type, $package)

Registers a filter implementation package $package under the name $type.

$filter->filter( $file )

Must be implemented by filter implementations. Returns true if the filter passes, false otherwise. This method must not alter the passed-in $file object.

$filter->invert()

Returns a filter whose filter method returns the opposite of this filter.

$filter->is_inverted()

Returns true if this filter is an inverted filter; false otherwise.

$filter->to_string

Converts the filter to a string. This method is also called implicitly by stringification.

$filter->inspect

Prints a human-readable debugging string for this filter. Useful for, you guessed it, debugging.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2026