Skip to content

Tidy imports: enable perlimports sort + blank-line-delimited blocks - #3730

Merged
oalders merged 3 commits into
masterfrom
oalders-tidy-mc-web
Sep 18, 2026
Merged

oalders merged 3 commits into
masterfrom
oalders-tidy-mc-web

Conversation

@oalders

@oalders oalders commented Sep 17, 2026

Copy link
Copy Markdown
Member

Enable sort in perlimports.toml and reorganize use statements into blank-line-delimited blocks:

  • use Moo/use Moose/*::Role hoisted into their own block above the sorted includes.
  • namespace::clean/autoclean kept in a trailing block.

Blank lines are sort boundaries for perlimports, so the object-system pragma stays put instead of being scattered mid-list. Changes are import reordering/whitespace only — no imports added or removed.

🤖 Generated with Claude Code

@codecov

codecov Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.80%. Comparing base (83c5684) to head (974b8f6).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3730   +/-   ##
=======================================
  Coverage   76.80%   76.80%           
=======================================
  Files          71       71           
  Lines        2522     2522           
  Branches      360      360           
=======================================
  Hits         1937     1937           
  Misses        455      455           
  Partials      130      130           
Files with missing lines Coverage Δ
app.psgi 90.90% <100.00%> (ø)
lib/MetaCPAN/Web/API/ReleaseInfo/Orchestrator.pm 100.00% <ø> (ø)
lib/MetaCPAN/Web/Authentication/User.pm 55.00% <ø> (ø)
lib/MetaCPAN/Web/Controller/Author.pm 97.18% <ø> (ø)
lib/MetaCPAN/Web/Controller/Changes.pm 91.30% <ø> (ø)
lib/MetaCPAN/Web/Controller/ContributingDoc.pm 84.61% <ø> (ø)
lib/MetaCPAN/Web/Controller/Diff.pm 61.53% <ø> (ø)
lib/MetaCPAN/Web/Controller/Permission.pm 90.00% <ø> (ø)
lib/MetaCPAN/Web/Controller/Raw.pm 54.28% <ø> (ø)
lib/MetaCPAN/Web/Controller/Release.pm 91.17% <ø> (ø)
... and 11 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

use experimental 'postderef';

use Moose;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving use Moose after use experimental will re-enable the experimental warnings.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks!

oalders and others added 3 commits September 17, 2026 17:17
Hoist use Moo/Moose (and *::Role) into their own block above the
contiguous includes, with a blank line above and below, and keep
namespace::clean/autoclean in a trailing block. perlimports treats a
blank line as a sort boundary, so this layout is stable under
perlimports --sort instead of scattering the object-system pragma into
the middle of the include list.

Also move the PLACK_ENV TODO comment in app.psgi out of the import
block (it had been dragged mid-block by --sort) to sit with the BEGIN
env logic, keeping the imports contiguous.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Turn on the perlimports sort option so imports are kept alphabetically
ordered. Paired with the blank-line-delimited import blocks so the
object-system pragma (Moo/Moose) is not scattered into the include list.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@oalders
oalders force-pushed the oalders-tidy-mc-web branch from d8920df to 974b8f6 Compare September 17, 2026 17:17
@oalders
oalders requested a review from haarg September 17, 2026 19:39
@oalders
oalders merged commit 23032e5 into master Sep 18, 2026
11 checks passed
@oalders
oalders deleted the oalders-tidy-mc-web branch September 18, 2026 14:21
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.

3 participants