Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Tidied up attribute 'type'. #1
I received the distribution as part of December assignment for Pull Request Club.
In this PR, I proposed to make the attribute 'type' more strict. As currently user can set the 'type' attribute in the constructor which gets overridden and ignored silently. I proposed to make the attribute "readonly" and stop user setting in the constructor.
Using init_arg => undef, we can ignore any value provided by the constructor. However it still didn't warn the user. I came across very handy MooseX::StrictConstructor that does the job very nicely.
Please let me know if you want to make any changes to my proposals. I am more than happy to change it as per your taste as it is your baby.