File::Codeowners::Util - Grab bag of utility subs for Codeowners modules
version 0.51
DO NOT USE except in File::Codeowners and related modules.
$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.
undef
$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
$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.
$proc = run_git(@args); $proc = run_git(@args, $filter);
Run git.
git
$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.
$proc = git_ls_files(); $proc = git_ls_files($directory);
Run git ls-files while handling path quoting.
git ls-files
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.
Charles McGarvey <chazmcgarvey@brokenzipper.com>
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.
To install File::Codeowners, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::Codeowners
CPAN shell
perl -MCPAN -e shell install File::Codeowners
For more information on module installation, please visit the detailed CPAN module installation guide.