Skip to content

M-M confused by Object::Pad's class syntax #33

@leonerd

Description

@leonerd

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions