The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

App::perl::distrolint::CheckRole::EachFile - role for checks that iterate over files

DESCRIPTION

This role provides a number of helper trampoline methods for implementing check classes whose logic should iterate over various types of file found in the distribution source.

METHODS

The following are trampoline methods. The first argument should either be a code reference or a method name as a plain string. The remaining arguments will be passed to the invoked code, along with the name of each selected file.

run_for_each_file

   $check->run_for_each_file( $method, @args );

Invokes the code once for every file found in the distribution.

run_for_each_perl_file

   $check->run_for_each_perl_file( $method, @args );

Invokes the code once for every perl source file found. These will be files whose extension is .PL, .pl, .pm or .t.

run_for_each_test_file

   $check->run_for_each_test_file( $method, @args );

Invokes the code once for every test source file found. These will be files whose extension is .t.

run_for_each_source_file

   $check->run_for_each_source_file( $method, @args );

Invokes the code once for every source file found. These will be all the Perl source files, plus files whose extension is .c, .h, or .xs, or files named typemap.

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>