NAME

Test::LocalFunctions::Fast - Detects unused local function by Compiler::Lexer

SYNOPSIS

# check modules that are listed in MANIFEST
use Test::LocalFunctions::Fast;
use Test::More;

all_local_functions_ok();
done_testing;

# you can also specify individual file
use Test::LocalFunctions::Fast;
use Test::More;

local_functions_ok('/path/to/your/module_or_script');
done_testing;

DESCRIPTION

Test::LocalFunctions::Fast is finds unused local functions to clean up the source code. (Local function means the function which name starts from underscore.)

This module is faster than Test::LocalFunction::PPI, because this module uses Compiler::Lexer as lexical tokenizer.

METHODS

  • all_local_functions_ok

    This is a test function which finds unused variables from modules that are listed in MANIFEST file.

  • local_functions_ok

    This is a test function which finds unused variables from specified source code. This function requires an argument which is the path to source file.

DEPENDENCIES

  • Compiler::Lexer (version 0.12 or later)

  • Sub::Identify (version 0.04 or later)

  • Test::Builder::Module (version 0.98 or later)

  • Test::Builder::Tester (version 1.22 or later)

SEE ALSO

Test::LocalFunctions

Test::LocalFunctions::PPI