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

Data::Section should use Sub::Exporter::ForMethods #11

Closed
autarch opened this issue Feb 20, 2014 · 7 comments
Closed

Data::Section should use Sub::Exporter::ForMethods #11

autarch opened this issue Feb 20, 2014 · 7 comments

Comments

@autarch
Copy link

autarch commented Feb 20, 2014

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.

@karenetheridge
Copy link
Contributor

That doesn't explain why you think the subs should always be installed as methods?

@autarch
Copy link
Author

autarch commented Feb 20, 2014

@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).

@karenetheridge
Copy link
Contributor

sounds like the docs should s/methods/subs/g then ;)

@autarch
Copy link
Author

autarch commented Feb 20, 2014

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.

@autarch
Copy link
Author

autarch commented Feb 20, 2014

I'd actually note that with Moose we already have a perfectly good tool for exporting methods. It's called Moose::Role ;)

@rjbs
Copy link
Owner

rjbs commented Apr 5, 2014

The docs already point at ForMethods, and I think that's sufficient.

@rjbs rjbs closed this as completed Apr 5, 2014
@karenetheridge
Copy link
Contributor

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.

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

3 participants