-
Notifications
You must be signed in to change notification settings - Fork 10
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
Data::Section should use Sub::Exporter::ForMethods #11
Comments
That doesn't explain why you think the subs should always be installed as methods? |
@karenetheridge - Because the Data::Section docs explicitly talk about "the methods exported by Data::Section". If they're intended to be used as methods then they should be installed as methods. But amusingly, I didn't realize I'd linked to the Data::Section docs (I thought it was in MX::Declare). |
sounds like the docs should |
It's more than just that phrase. You need to read the docs, I think. They clearly show all uses of this module as being via method calls. That said, I'd be fine if this was rewritten to actually be exported subs. I don't really like the "export methods" thing. |
I'd actually note that with Moose we already have a perfectly good tool for exporting methods. It's called Moose::Role ;) |
The docs already point at ForMethods, and I think that's sufficient. |
After re-reading this issue, I think I'm inclined to agree with you - the subs are called as methods, therefore we don't want the subs ever to be cleaned, so it would be reasonable to always install as methods. |
See https://metacpan.org/pod/Data::Section#MooseX::Declare-and-namespace::autoclean for an explanation of why along with the workaround I'm currently using.
The text was updated successfully, but these errors were encountered: