Perl-Toolchain-Gang / Perl-Toolchain-Gang/Module-Metadata
M-M confused by Object::Pad's `class` syntax
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 8
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
Object::Pad provides a new syntax for declaring packages that provide an object class, using the class keyword. This can also set the $VERSION of the package.
class Module::Name 1.23 {
...
}
class Another::Module 4.56;
...
Currently Module::Metadata does not understand this syntax and fails to extract versions.
A workaround is to provide both a package and a class declaration, because doing so will not confuse Object::Pad but does mean the version is correctly extracted. E.g. see https://metacpan.org/source/PEVANS/Device-Chip-CC1101-0.03/lib/Device/Chip/CC1101.pm#L9-12:
package Device::Chip::CC1101 0.03 { }
class Device::Chip::CC1101
extends Device::Chip;
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Module::Metadata’s version-extraction path and compare its behavior with the Object::Pad examples in the issue. Reproduce the failure for both class declaration forms, then add coverage showing that versions are extracted without requiring a package declaration. Done means the reported Object::Pad syntax is recognized correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100