Skip to content

fix: add use warnings to all production modules#256

Draft
toddr-bot wants to merge 1 commit intocpan-authors:mainfrom
toddr-bot:koan.toddr.bot/add-use-warnings
Draft

fix: add use warnings to all production modules#256
toddr-bot wants to merge 1 commit intocpan-authors:mainfrom
toddr-bot:koan.toddr.bot/add-use-warnings

Conversation

@toddr-bot
Copy link
Copy Markdown
Collaborator

What

Add use warnings to Parser.pm and all five Style modules.

Why

These modules had use strict but not use warnings — a historical artifact from before warnings was standard practice. Without it, subtle issues (uninitialized values, numeric/string mismatches) are silently swallowed at runtime.

Expat.pm is intentionally excluded: it documents why warnings are not enabled globally (namespace methods use int() on strings, requiring locally scoped no warnings "numeric").

How

One-line addition to each of the 6 files. No behavioral changes.

Testing

Full test suite passes with no new warnings.

🤖 Generated with Claude Code

Parser.pm and the five Style modules (Debug, Objects, Stream, Subs,
Tree) had use strict but not use warnings. Expat.pm is intentionally
excluded — it already documents why warnings are not enabled globally
(namespace methods use int() on strings with locally scoped no warnings
"numeric").

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.73%. Comparing base (45216a7) to head (0928fcf).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #256   +/-   ##
=======================================
  Coverage   75.73%   75.73%           
=======================================
  Files           1        1           
  Lines        1092     1092           
  Branches      342      342           
=======================================
  Hits          827      827           
  Misses         59       59           
  Partials      206      206           
Flag Coverage Δ
perl 75.73% <ø> (ø)
xs 75.73% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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