Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should use class methods instead of plain subs #145

Open
eyadof opened this issue May 7, 2021 · 0 comments
Open

Should use class methods instead of plain subs #145

eyadof opened this issue May 7, 2021 · 0 comments

Comments

@eyadof
Copy link
Contributor

eyadof commented May 7, 2021

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()
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

No branches or pull requests

1 participant