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

Prevent subroutine prototype mismatch between Dancer's load and Module::Load #17

Merged
merged 2 commits into from Feb 9, 2014

Conversation

rustyconover
Copy link
Contributor

Without preventing Dancer's load subroutine form being exported it will conflict with Module::Load's load subroutine. Giving warnings like:

Subroutine Dancer::Plugin::Email::load redefined at /usr/local/lib/perl5/site_perl/5.18.2/Module/Load.pm line 30.
Prototype mismatch: sub Dancer::Plugin::Email::load: none vs (*;@) at /usr/local/lib/perl5/site_perl/5.18.2/Module/Load.pm line 30.

This patch prevent's Dancer's load keyword from being exported.

@ironcamel
Copy link
Owner

Thanks @rustyconover. It is strange that I don't see that warning, but what you are saying makes sense. I think a slightly better solution would be: use Dancer qw(:syntax debug warning);. That way we are explicitly importing only the keywords we need, instead of polluting the namespace with all of Dancer's DSL. If you update your PR, I will pull it. Thanks.

@rustyconover
Copy link
Contributor Author

@ironcamel the pull request has been updated.

ironcamel added a commit that referenced this pull request Feb 9, 2014
Prevent subroutine prototype mismatch between Dancer's load and Module::Load
@ironcamel ironcamel merged commit a8a84a5 into ironcamel:master Feb 9, 2014
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

Successfully merging this pull request may close these issues.

None yet

2 participants