NAME
App::Project::Doctor::Check::CpanReadiness - Pre-upload CPAN readiness check
DESCRIPTION
Performs a final pre-flight sweep: version format, Changes, MANIFEST, README presence, and basic Changes content.
For the README requirement any of the following file names is accepted: README, README.md, README.pod, README.rst, README.txt. An error is only raised when none of these exist.
METHODS
check( $context )
API SPECIFICATION
Input
$context : App::Project::Doctor::Context
Output
List of App::Project::Doctor::Finding with severities:
error -- version format wrong, required file absent, no README variant found
warning -- version undetermined, Changes has no version entries
info -- MANIFEST present (stale-check advisory)
pass -- all criteria met (only when no errors or warnings)
MESSAGES
Code | Trigger | Resolution
-----|-------------------------------------------|-------------------------------------------
R001 | Version format invalid | Use X.YY or X.YY.ZZ
R002 | Changes or MANIFEST missing | Create the file
R003 | No README variant found | Add README, README.md, README.pod, etc.
R004 | Changes has no version entries | Add a changelog entry
FORMAL SPECIFICATION
README_VARIANTS = {README, README.md, README.pod, README.rst, README.txt}
check : Context -> [Finding]
check ctx ==
version_check ctx
++ [file_check f | f <- REQUIRED_FILES]
++ (if (exists v in README_VARIANTS: ctx has_file v) then [] else [error])
++ changes_check ctx
++ (if no problems then [pass] else [])
AUTHOR
Nigel Horne <njh@nigelhorne.com>
LICENSE
Copyright (C) 2026 Nigel Horne. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.