The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Dist::Mgr::FileData - Fetch pre-written contents for various distribution files.

DESCRIPTION

This module returns arrays of pre-written file contents that can be used to insert into various files.

SYNOPSIS

use Dist::Mgr::FileData qw(:all);

EXPORT_OK

We export nothing by default. See the "FUNCTIONS" section for everything that can be imported individually, or with the :all tag.

All functions are quasi-private and mainly used for development, but I've decided to advertise them anyway.

FUNCTIONS

_changes_file($module)

Returns an array of the lines of a default custom Changes file.

_ci_github_file($os)

Return an array of the file contents of a custom Github Actions CI configuration file.

Send in the parameters within an array reference. Each entry signifies the OS of the system the build will run on. The three options mapped to how we handle them internally.

        l => qq{ubuntu-latest},
        w => qq{windows-latest},
        m => qq{macos-latest},

_config_file

Returns a hash reference containing the data that makes up a default configuration file.

_git_ignore_file()

Returns an array of the contents of a populated .gitignore file.

_module_section_ci_badges($author, $repo)

Returns an array of the lines required to add CI and coverage badges. $author is your Github username, and $repo should be self-explanitory.

_module_template_file($module, $author, $email)

Returns an array of the file lines of our default module file. Parameters are the same as if you were running module-starter at the command line.

_makefile_section_meta_merge()

Return an array of the skeleton contents of a Makefile.PL META_MERGE section. We put repository and bugtracer information in here.

_makefile_section_bugtracker($author, $repo)

Returns an array of the contents that make up the bugtracker section of a Makefile.PL file.

_makefile_section_repo($author, $repo)

Returns an array of the contents that make up the repository section of a Makefile.PL file.

_manifest_skip_file()

Returns an array of the file lines that make up a default MANIFEST.SKIP file.

_manifest_t_file()

Returns an array of the file lines that make up our custom t/makefile.t test file.

_unwanted_filesystem_entries()

Returns an array of files and directories we remove from the base, stock distribution after it's been initialized.

Adding New File Contents

Read through the various functions to get an idea of how things hang together.

Manage any required variables.

The dev/quote_file_contents.pl script takes a file name as an argument, and will generate and print to STDOUT the quoted contents that can be dropped into an array and returned from your new function.

Change the quote type within the script if required.

AUTHOR

Steve Bertrand, <steveb at cpan.org>

LICENSE AND COPYRIGHT

Copyright 2020-2021 Steve Bertrand.

This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:

http://www.perlfoundation.org/artistic_license_2_0