Contributing to This Distribution

First off - thank you for taking the time to contribute! Your help makes this project better for everyone.

Code of Conduct

Please note that this project follows the Contributor Covenant 3.0.

By participating, you are expected to uphold this code.

Contributor Quick-Start

  1. Pick your lane!

    • Dist::Zilla users: branch from main

    • Non-DZil users: branch from build/main (latest artifacts) or build/release (CPAN-shipped artifacts)

  2. Set up your environment!

    • DZil lane:

      dzil authordeps --missing | cpanm
      dzil listdeps  --missing | cpanm
      
    • Non-DZil lane:

      cpanm --with-develop --installdeps .
      
  3. Build & test!

    • DZil: dzil build && dzil test --all

    • Non-DZil: prove -l

  4. Edit only the right files!

    Source: lib/, bin/, t/, and *.c sources

    Do not edit: README.md (generated from POD), Makefile.PL, or any other auto-generated artifacts!

  5. Wrap it up!

    • Add an entry to Changes

    • Commit with a clear message

    • Push branch and open PR (DZil: main, Non-DZil: build/main)

Common Pitfalls (skip ahead if you want detailed instructions)

Branch & PR Guidelines

Development Workflows

This project supports two contributor setups:

1. Dist::Zilla (Full Authoring Environment)

If you have Dist::Zilla installed with the required plugins:

  1. Install dependencies:

    dzil authordeps --missing | cpanm
    dzil listdeps --missing | cpanm
    

    Build and test:

    dzil build
    dzil test --all
    
  2. Make changes in the source files. Don't touch the automatically-generated-from-POD README.md or Makefile.PL.

    POD lives alongside the code it documents. There's no need to update the README as that is automatically generated from the main module.

    Key source files:

    • lib: Perl modules
    • bin: executable scripts
    • t: unit tests
    • oslogwrapper.c: C source used to wrap macOS libraries
  3. Update Changes and push your branch to Codeberg.

2. Non-Dist::Zilla (Generated Artifacts Only)

If you don't use DZil, you should work from the CPAN tarball. If you know what you're doing, you can work from a branch of build/main or build/release that contains generated files (Makefile.PL, etc.). Those branches are for build artifacts, so there's no need to regenerate them locally.

Remember that the main branch is only updated by maintainers.

  1. Install dependencies from the included cpanfile. Note that the Makefile.PL will already be there

    cpanm --with-develop --installdeps .
    
  2. Run the test suite:

    prove -l
    
  3. Make changes directly in the working tree.

  4. Update Changes and commit normally.

Submitting Your Contribution

  1. Push your branch to your fork.

  2. Open a Pull Request against the main branch if using Dist::Zilla, or build/main if not.

Reporting Bugs

Use the bug tracker listed in the distribution metadata (also in the SUPPORT section of the POD and the README document). Please include:

Thanks again for contributing!