Skip to content

fix: move test deps from PREREQ_PM to TEST_REQUIRES#40

Draft
toddr-bot wants to merge 1 commit into
cpan-authors:mainfrom
toddr-bot:koan.toddr.bot/fix-test-deps-in-prereq
Draft

fix: move test deps from PREREQ_PM to TEST_REQUIRES#40
toddr-bot wants to merge 1 commit into
cpan-authors:mainfrom
toddr-bot:koan.toddr.bot/fix-test-deps-in-prereq

Conversation

@toddr-bot

Copy link
Copy Markdown
Contributor

What

Move DBD::SQLite and Test::More from PREREQ_PM (runtime) to TEST_REQUIRES (test-only), and update META_MERGE to META spec 2.0 structured format.

Why

PREREQ_PM declares runtime dependencies. Anyone installing Tie::DBI via CPAN gets DBD::SQLite pulled in even when they're using MySQL or Postgres — unnecessary download and compilation. These are test-only dependencies and belong in TEST_REQUIRES.

The META resources were also using the legacy flat format, which prevents MetaCPAN from rendering proper repository/bugtracker links.

How

  • Extract test deps into %test_requires hash for DRY reuse
  • Use TEST_REQUIRES on EUMM >= 6.64, fall back to PREREQ_PM on older versions
  • Update META_MERGE to spec 2.0: structured repository (type/url/web), bugtracker (web), license (arrayref)

Testing

  • perl Makefile.PL generates correct MYMETA.json with test deps in prereqs.test.requires
  • make test passes
  • make disttest passes

🤖 Generated with Claude Code

DBD::SQLite and Test::More were listed in PREREQ_PM, making them
runtime dependencies. Anyone installing Tie::DBI via CPAN would pull
in DBD::SQLite even when using MySQL/Postgres. Move them to
TEST_REQUIRES (with fallback for EUMM < 6.64).

Also update META_MERGE to META spec 2.0 structured format for
repository, bugtracker, and license resources.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant