Skip to content

fix: modernize Digest::file and document digest_file_ctx#12

Closed
toddr-bot wants to merge 21 commits into
gisle:masterfrom
Dual-Life:koan.toddr.bot/modernize-digest-file
Closed

fix: modernize Digest::file and document digest_file_ctx#12
toddr-bot wants to merge 21 commits into
gisle:masterfrom
Dual-Life:koan.toddr.bot/modernize-digest-file

Conversation

@toddr-bot
Copy link
Copy Markdown

What

Modernize Digest::file module: replace legacy @ISA inheritance with use parent, add POD documentation for the exported-but-undocumented digest_file_ctx() function, and add direct test coverage.

Why

Digest::file was the last module still using @ISA = qw(Exporter) — the other modules were modernized in v1.18 (partially addressing guillemj's upstream PR #4). The digest_file_ctx function has been exported via @EXPORT_OK since its introduction, but was never documented in the POD, making it invisible to users who read the documentation.

How

  • Replace use Exporter (); @ISA = qw(Exporter) with use parent 'Exporter' — cleaner, declarative, and consistent with modern Perl style
  • Add digest_file_ctx documentation to the POD section alongside the existing 3 functions
  • Add 4 new tests: isa_ok and digest verification for digest_file_ctx, plus error handling for missing files

Testing

prove -l t/ — all 27 tests pass across 4 test files.


🤖 Generated with Claude Code

toddr and others added 21 commits October 6, 2020 09:56
- meta-spec 2 resources format
- dependencies are static, set dynamic_config 0
- EUMM will set configure_requires on itself
- Test::More only used in tests
- boilerplate to clean out unsupported keys if installed with old EUMM
Makefile.PL - use meta-spec 2, fix prereqs, compatibility with old EUMM
base.t, file.t: unlink temporary files created during testing
Replace legacy @ISA-based Exporter inheritance with 'use parent',
completing the modernization that was partially done in v1.18.
Document digest_file_ctx() in POD — it was exported but invisible
to users reading the documentation. Add direct test coverage for
digest_file_ctx including error handling.

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

Superseded by #13, which combines all three improvements (DESTROY guard, Digest::file modernization, digest_file_ctx documentation).

@toddr-bot toddr-bot closed this Apr 22, 2026
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.

5 participants