Skip to content

Should use class methods instead of plain subs #145

@eyadof

Description

@eyadof

We have a couple of methods in RPC/Message.pm that are factory-style subs:

as per @tom-binary this is a problem as we should not mix plain subs and methods in the same package:

we should make them class methods like:

use Object::Pad;
 class Example { 
   sub new_from_something ($class, %args) { 
     return $class->new(%args)
   }
} 
Example->new_from_something()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions