NAME

File::Codeowners::Util - Grab bag of utility subs for Codeowners modules

VERSION

version 0.55

DESCRIPTION

DO NOT USE except in File::Codeowners and related modules.

FUNCTIONS

find_nearest_codeowners

$filepath = find_nearest_codeowners($dirpath);

Find the CODEOWNERS file in the current working directory, or search in the parent directory recursively until a CODEOWNERS file is found.

Returns undef if no CODEOWNERS is found.

find_codeowners_in_directory

$filepath = find_codeowners_in_directory($dirpath);

Find the CODEOWNERS file in a given directory. No recursive searching is done.

Returns the first of (or undef if none found):

  • CODEOWNERS

  • docs/CODEOWNERS

  • .bitbucket/CODEOWNERS

  • .github/CODEOWNERS

  • .gitlab/CODEOWNERS

run_command

$proc = run_command(@cmd);
$proc = run_command(@cmd, $filter);

while (defined (my $line = $proc->next)) { ...  }
$status = $proc->wait;

Run a command and read its output, optionally filtering each line.

run_git

$proc = run_git(@args);
$proc = run_git(@args, $filter);

Run git.

git_toplevel

$path = git_toplevel();
$path = git_toplevel($directory);

Get a Path::Tiny of the toplevel directory for a git repository, or undef of there is none.

git_ls_files

$proc = git_ls_files();
$proc = git_ls_files($directory);

Run git ls-files while handling path quoting.

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/chazmcgarvey/File-Codeowners/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

Charles McGarvey <chazmcgarvey@brokenzipper.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2021 by Charles McGarvey.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.