App::Ack::Filter - Filter objects to filter files
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.
App::Ack::File
# 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);
Creates a filter implementation, registered as $type. @args are provided as additional arguments to the implementation's constructor.
$type
@args
Registers a filter implementation package $package under the name $type.
$package
Must be implemented by filter implementations. Returns true if the filter passes, false otherwise. This method must not alter the passed-in $file object.
$file
Returns a filter whose "filter" method returns the opposite of this filter.
Returns true if this filter is an inverted filter; false otherwise.
Converts the filter to a string. This method is also called implicitly by stringification.
Prints a human-readable debugging string for this filter. Useful for, you guessed it, debugging.
To install App::Ack, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Ack
CPAN shell
perl -MCPAN -e shell install App::Ack
For more information on module installation, please visit the detailed CPAN module installation guide.